db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/util/sequence SequenceManagerHighLowImpl.java
Date Fri, 25 Mar 2005 19:07:18 GMT
brj         2005/03/25 11:07:18

  Modified:    src/java/org/apache/ojb/broker/util/sequence
                        SequenceManagerHighLowImpl.java
  Log:
  use QueryFactory.newQuery()
  
  Revision  Changes    Path
  1.31      +6 -6      db-ojb/src/java/org/apache/ojb/broker/util/sequence/SequenceManagerHighLowImpl.java
  
  Index: SequenceManagerHighLowImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/sequence/SequenceManagerHighLowImpl.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- SequenceManagerHighLowImpl.java	14 Nov 2004 09:36:44 -0000	1.30
  +++ SequenceManagerHighLowImpl.java	25 Mar 2005 19:07:18 -0000	1.31
  @@ -15,20 +15,20 @@
    * limitations under the License.
    */
   
  +import java.util.HashMap;
  +import java.util.Map;
  +
   import org.apache.commons.lang.SystemUtils;
   import org.apache.ojb.broker.OptimisticLockException;
   import org.apache.ojb.broker.PersistenceBroker;
   import org.apache.ojb.broker.metadata.FieldDescriptor;
   import org.apache.ojb.broker.query.Criteria;
   import org.apache.ojb.broker.query.Query;
  -import org.apache.ojb.broker.query.QueryByCriteria;
  +import org.apache.ojb.broker.query.QueryFactory;
   import org.apache.ojb.broker.util.ObjectModificationDefaultImpl;
   import org.apache.ojb.broker.util.logging.Logger;
   import org.apache.ojb.broker.util.logging.LoggerFactory;
   
  -import java.util.HashMap;
  -import java.util.Map;
  -
   /**
    * High/Low sequence manager implementation generates unique and continuous
    * id's (during runtime) by using sequences to avoid database access.
  @@ -218,7 +218,7 @@
   
           Criteria c = new Criteria();
           c.addEqualTo(PK_FIELD, seqName);
  -        Query q = new QueryByCriteria(HighLowSequence.class, c);
  +        Query q = QueryFactory.newQuery(HighLowSequence.class, c); 
   
           // first we lookup sequence object in database
           newSequence = (HighLowSequence) broker.getObjectByQuery(q);
  
  
  

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