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 ODMGBaseBeanImpl.java RollbackBean.java
Date Thu, 13 Jan 2005 19:57:44 GMT
arminw      2005/01/13 11:57:44

  Modified:    src/ejb/org/apache/ojb/ejb/pb Tag: OJB_1_0_RELEASE
                        PBBaseBeanImpl.java PersonArticleManagerPBBean.java
                        PBSessionBean.java RollbackBean.java
                        PersonManagerPBBean.java
               src/ejb/org/apache/ojb/ejb/odmg Tag: OJB_1_0_RELEASE
                        ODMGBaseBeanImpl.java RollbackBean.java
  Log:
  apply patch by Vadim Gritsenko:
  QueryByCriteria Usage
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.4.2.1   +3 -3      db-ojb/src/ejb/org/apache/ojb/ejb/pb/PBBaseBeanImpl.java
  
  Index: PBBaseBeanImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/ejb/org/apache/ojb/ejb/pb/PBBaseBeanImpl.java,v
  retrieving revision 1.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  --- PBBaseBeanImpl.java	5 Apr 2004 00:17:08 -0000	1.4
  +++ PBBaseBeanImpl.java	13 Jan 2005 19:57:44 -0000	1.4.2.1
  @@ -94,7 +94,7 @@
           int result;
           try
           {
  -            result = broker.getCount(new QueryByCriteria(target, null));
  +            result = broker.getCount(new QueryByCriteria(target));
           }
           finally
           {
  @@ -112,7 +112,7 @@
           Collection result;
           try
           {
  -            Query q = new QueryByCriteria(target, null);
  +            Query q = new QueryByCriteria(target);
               result = broker.getCollectionByQuery(q);
           }
           finally
  
  
  
  1.5.2.3   +2 -2      db-ojb/src/ejb/org/apache/ojb/ejb/pb/PersonArticleManagerPBBean.java
  
  Index: PersonArticleManagerPBBean.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/ejb/org/apache/ojb/ejb/pb/PersonArticleManagerPBBean.java,v
  retrieving revision 1.5.2.2
  retrieving revision 1.5.2.3
  diff -u -r1.5.2.2 -r1.5.2.3
  --- PersonArticleManagerPBBean.java	11 Sep 2004 12:20:01 -0000	1.5.2.2
  +++ PersonArticleManagerPBBean.java	13 Jan 2005 19:57:44 -0000	1.5.2.3
  @@ -108,7 +108,7 @@
           try
           {
               // do something with broker
  -            Query q = new QueryByCriteria(PersonVO.class, null);
  +            Query q = new QueryByCriteria(PersonVO.class);
               broker.getCollectionByQuery(q);
               // System.out.println("## broker1: con=" + broker.serviceConnectionManager().getConnection());
               //now use nested bean call
  
  
  
  1.5.2.2   +4 -4      db-ojb/src/ejb/org/apache/ojb/ejb/pb/PBSessionBean.java
  
  Index: PBSessionBean.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/ejb/org/apache/ojb/ejb/pb/PBSessionBean.java,v
  retrieving revision 1.5.2.1
  retrieving revision 1.5.2.2
  diff -u -r1.5.2.1 -r1.5.2.2
  --- PBSessionBean.java	11 Sep 2004 12:20:01 -0000	1.5.2.1
  +++ PBSessionBean.java	13 Jan 2005 19:57:44 -0000	1.5.2.2
  @@ -134,7 +134,7 @@
       protected int getCount(Class target)
       {
           PersistenceBroker broker = getBroker();
  -        int result = broker.getCount(new QueryByCriteria(target, null));
  +        int result = broker.getCount(new QueryByCriteria(target));
           broker.close();
           return result;
       }
  @@ -146,7 +146,7 @@
       {
           if(log.isDebugEnabled()) log.debug("getAllObjects was called");
           PersistenceBroker broker = getBroker();
  -        Query q = new QueryByCriteria(target, null);
  +        Query q = new QueryByCriteria(target);
           Collection result = broker.getCollectionByQuery(q);
           broker.close();
           return result;
  @@ -159,7 +159,7 @@
       {
           if(log.isDebugEnabled()) log.debug("getAllObjects was called");
           PersistenceBroker broker = getBroker();
  -        Query q = new QueryByCriteria(target, null);
  +        Query q = new QueryByCriteria(target);
           Iterator result = broker.getIteratorByQuery(q);
           broker.close();
           return result;
  
  
  
  1.1.2.2   +2 -2      db-ojb/src/ejb/org/apache/ojb/ejb/pb/RollbackBean.java
  
  Index: RollbackBean.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/ejb/org/apache/ojb/ejb/pb/RollbackBean.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- RollbackBean.java	11 Sep 2004 12:20:01 -0000	1.1.2.1
  +++ RollbackBean.java	13 Jan 2005 19:57:44 -0000	1.1.2.2
  @@ -213,7 +213,7 @@
           PersistenceBroker broker = getBroker();
           try
           {
  -            Query q = new QueryByCriteria(searchClass, new Criteria());
  +            Query q = new QueryByCriteria(searchClass);
               // we get the iterator and step into the first found object
               Iterator it = broker.getIteratorByQuery(q);
               it.next();
  
  
  
  1.4.2.1   +2 -2      db-ojb/src/ejb/org/apache/ojb/ejb/pb/PersonManagerPBBean.java
  
  Index: PersonManagerPBBean.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/ejb/org/apache/ojb/ejb/pb/PersonManagerPBBean.java,v
  retrieving revision 1.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  --- PersonManagerPBBean.java	5 Apr 2004 00:17:08 -0000	1.4
  +++ PersonManagerPBBean.java	13 Jan 2005 19:57:44 -0000	1.4.2.1
  @@ -112,7 +112,7 @@
           Criteria criteria = new Criteria();
           if (firstname != null) criteria.addEqualTo("firstname", firstname);
           if (lastname != null) criteria.addEqualTo("firstname", lastname);
  -        Query q = new QueryByCriteria(PersonVO.class, null);
  +        Query q = new QueryByCriteria(PersonVO.class);
           Collection result = broker.getCollectionByQuery(q);
           broker.close();
           return result;
  
  
  
  No                   revision
  No                   revision
  1.5.2.3   +2 -2      db-ojb/src/ejb/org/apache/ojb/ejb/odmg/ODMGBaseBeanImpl.java
  
  Index: ODMGBaseBeanImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/ejb/org/apache/ojb/ejb/odmg/ODMGBaseBeanImpl.java,v
  retrieving revision 1.5.2.2
  retrieving revision 1.5.2.3
  diff -u -r1.5.2.2 -r1.5.2.3
  --- ODMGBaseBeanImpl.java	11 Sep 2004 12:20:01 -0000	1.5.2.2
  +++ ODMGBaseBeanImpl.java	13 Jan 2005 19:57:44 -0000	1.5.2.3
  @@ -170,7 +170,7 @@
       public int getCount(Class target)
       {
           PersistenceBroker broker = ((HasBroker) odmg.currentTransaction()).getBroker();
  -        int result = broker.getCount(new QueryByCriteria(target, null));
  +        int result = broker.getCount(new QueryByCriteria(target));
           return result;
       }
   
  
  
  
  1.1.2.2   +2 -2      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.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- RollbackBean.java	11 Sep 2004 12:20:01 -0000	1.1.2.1
  +++ RollbackBean.java	13 Jan 2005 19:57:44 -0000	1.1.2.2
  @@ -270,7 +270,7 @@
           tx.flush();
           Class searchClass = objectsToStore.get(0).getClass();
           PersistenceBroker broker = tx.getBroker();
  -        Query q = new QueryByCriteria(searchClass, new Criteria());
  +        Query q = new QueryByCriteria(searchClass);
           // we get the iterator and step into the first found object
           Iterator it = broker.getIteratorByQuery(q);
           it.next();
  
  
  

---------------------------------------------------------------------
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