db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: db-ojb/src/ejb/org/apache/ojb/ejb/odmg ODMGSessionBean.java RollbackBean.java
Date Thu, 24 Mar 2005 19:05:07 GMT
arminw      2005/03/24 11:05:07

  Modified:    samples/tutorial2/src/java/org/apache/ojb/tutorial2 Tag:
                        OJB_1_0_RELEASE UCDeleteProduct.java
                        UCEditProduct.java UCListAllProducts.java
               src/ejb/org/apache/ojb/ejb/odmg Tag: OJB_1_0_RELEASE
                        ODMGSessionBean.java RollbackBean.java
  Log:
  fix tutorials and ejb examples, use List instead of DList
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.2   +7 -2      db-ojb/samples/tutorial2/src/java/org/apache/ojb/tutorial2/Attic/UCDeleteProduct.java
  
  Index: UCDeleteProduct.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/samples/tutorial2/src/java/org/apache/ojb/tutorial2/Attic/UCDeleteProduct.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- UCDeleteProduct.java	11 Jan 2005 22:15:00 -0000	1.1.2.1
  +++ UCDeleteProduct.java	24 Mar 2005 19:05:07 -0000	1.1.2.2
  @@ -15,7 +15,12 @@
    * limitations under the License.
    */
   
  -import org.odmg.*;
  +import java.util.List;
  +
  +import org.odmg.Implementation;
  +import org.odmg.Database;
  +import org.odmg.Transaction;
  +import org.odmg.OQLQuery;
   
   /**
    * Use case for deleting a product from the database.
  @@ -70,7 +75,7 @@
   
               query.create(oqlQuery);
   
  -            DList   result      = (DList)query.execute();
  +            List   result      = (List)query.execute();
               Product toBeDeleted = (Product)result.get(0);
   
               // 4. now mark object for deletion
  
  
  
  1.1.2.2   +6 -2      db-ojb/samples/tutorial2/src/java/org/apache/ojb/tutorial2/Attic/UCEditProduct.java
  
  Index: UCEditProduct.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/samples/tutorial2/src/java/org/apache/ojb/tutorial2/Attic/UCEditProduct.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- UCEditProduct.java	11 Jan 2005 22:15:00 -0000	1.1.2.1
  +++ UCEditProduct.java	24 Mar 2005 19:05:07 -0000	1.1.2.2
  @@ -15,7 +15,11 @@
    * limitations under the License.
    */
   
  -import org.odmg.*;
  +import java.util.List;
  +
  +import org.odmg.Implementation;
  +import org.odmg.Transaction;
  +import org.odmg.OQLQuery;
   
   /**
    * Use case for editing a product.
  @@ -68,7 +72,7 @@
   
               query.create(oqlQuery);
   
  -            DList   result     = (DList)query.execute();
  +            List   result     = (List)query.execute();
               Product toBeEdited = (Product)result.get(0);
   
               // 4. lock the product for write access
  
  
  
  1.1.2.2   +2 -2      db-ojb/samples/tutorial2/src/java/org/apache/ojb/tutorial2/Attic/UCListAllProducts.java
  
  Index: UCListAllProducts.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/samples/tutorial2/src/java/org/apache/ojb/tutorial2/Attic/UCListAllProducts.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- UCListAllProducts.java	11 Jan 2005 22:15:00 -0000	1.1.2.1
  +++ UCListAllProducts.java	24 Mar 2005 19:05:07 -0000	1.1.2.2
  @@ -16,8 +16,8 @@
    */
   
   import java.util.Iterator;
  +import java.util.List;
   
  -import org.odmg.DList;
   import org.odmg.Implementation;
   import org.odmg.OQLQuery;
   import org.odmg.Transaction;
  @@ -68,7 +68,7 @@
               query.create("select allproducts from " + Product.class.getName());
   
               // 4. perform the query and store the result in a persistent Collection
  -            DList allProducts = (DList) query.execute();
  +            List allProducts = (List) query.execute();
   
               tx.commit();
   
  
  
  
  No                   revision
  No                   revision
  1.5.2.3   +3 -4      db-ojb/src/ejb/org/apache/ojb/ejb/odmg/ODMGSessionBean.java
  
  Index: ODMGSessionBean.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/ejb/org/apache/ojb/ejb/odmg/ODMGSessionBean.java,v
  retrieving revision 1.5.2.2
  retrieving revision 1.5.2.3
  diff -u -r1.5.2.2 -r1.5.2.3
  --- ODMGSessionBean.java	11 Sep 2004 12:20:01 -0000	1.5.2.2
  +++ ODMGSessionBean.java	24 Mar 2005 19:05:07 -0000	1.5.2.3
  @@ -28,7 +28,6 @@
   import org.apache.ojb.broker.util.logging.LoggerFactory;
   import org.apache.ojb.ejb.ArticleVO;
   import org.apache.ojb.ejb.PersonVO;
  -import org.odmg.DList;
   import org.odmg.Database;
   import org.odmg.Implementation;
   import org.odmg.OQLQuery;
  @@ -160,12 +159,12 @@
       protected int getObjectCount(Implementation ojb, Class target)
       {
           if(log.isDebugEnabled()) log.debug("getObjectCount was called");
  -        DList list;
  +        List list;
           try
           {
               OQLQuery query = ojb.newOQLQuery();
               query.create("select allObjects from " + target.getName());
  -            list = (DList) query.execute();
  +            list = (List) query.execute();
               return list.size();
           }
           catch (QueryException e)
  
  
  
  1.1.2.3   +3 -4      db-ojb/src/ejb/org/apache/ojb/ejb/odmg/RollbackBean.java
  
  Index: RollbackBean.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/ejb/org/apache/ojb/ejb/odmg/RollbackBean.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- RollbackBean.java	13 Jan 2005 19:57:44 -0000	1.1.2.2
  +++ RollbackBean.java	24 Mar 2005 19:05:07 -0000	1.1.2.3
  @@ -37,7 +37,6 @@
   import org.apache.ojb.ejb.ArticleVO;
   import org.apache.ojb.ejb.PersonVO;
   import org.apache.ojb.odmg.TransactionExt;
  -import org.odmg.DList;
   import org.odmg.OQLQuery;
   import org.odmg.QueryException;
   
  @@ -306,12 +305,12 @@
       protected int getObjectCount(Class target)
       {
           log.info("getObjectCount was called");
  -        DList list;
  +        List list;
           try
           {
               OQLQuery query = getImplementation().newOQLQuery();
               query.create("select allObjects from " + target.getName());
  -            list = (DList) query.execute();
  +            list = (List) query.execute();
               return list.size();
           }
           catch(QueryException e)
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message