db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From olegn...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/core PersistenceBrokerImpl.java
Date Sat, 13 Dec 2003 18:10:14 GMT
olegnitz    2003/12/13 10:10:14

  Modified:    src/java/org/apache/ojb/broker/core
                        PersistenceBrokerImpl.java
  Log:
  Use getIteratorByQuery rather than getCollectionByQuery in getObjectByQuery
  
  Revision  Changes    Path
  1.59      +4 -4      db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java
  
  Index: PersistenceBrokerImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- PersistenceBrokerImpl.java	12 Dec 2003 16:30:37 -0000	1.58
  +++ PersistenceBrokerImpl.java	13 Dec 2003 18:10:13 -0000	1.59
  @@ -1208,14 +1208,14 @@
           }
           else
           {
  -            Vector coll = (Vector) getCollectionByQuery(query);
  -            if ((coll == null) || (coll.size() == 0))
  +            Iterator it = getIteratorByQuery(query);
  +            if (!it.hasNext())
               {
                   return null;
               }
               else
               {
  -                return coll.get(0);
  +                return 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