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/java/org/apache/ojb/broker/core QueryReferenceBroker.java
Date Thu, 29 Sep 2005 23:26:31 GMT
arminw      2005/09/29 16:26:31

  Modified:    src/java/org/apache/ojb/broker/core
                        QueryReferenceBroker.java
  Log:
  use instance method call instead of 'instanceof' to detect super reference descriptor
  
  Revision  Changes    Path
  1.41      +4 -9      db-ojb/src/java/org/apache/ojb/broker/core/QueryReferenceBroker.java
  
  Index: QueryReferenceBroker.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/core/QueryReferenceBroker.java,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- QueryReferenceBroker.java	18 Sep 2005 13:26:15 -0000	1.40
  +++ QueryReferenceBroker.java	29 Sep 2005 23:26:31 -0000	1.41
  @@ -43,7 +43,6 @@
   import org.apache.ojb.broker.metadata.FieldDescriptor;
   import org.apache.ojb.broker.metadata.FieldHelper;
   import org.apache.ojb.broker.metadata.ObjectReferenceDescriptor;
  -import org.apache.ojb.broker.metadata.SuperReferenceDescriptor;
   import org.apache.ojb.broker.metadata.fieldaccess.PersistentField;
   import org.apache.ojb.broker.query.Criteria;
   import org.apache.ojb.broker.query.Query;
  @@ -55,10 +54,6 @@
   /**
    * Encapsulates 1:1 and 1:n references and collection references stuff.
    *
  - * TODO: Should we made this class independend from PB implementation class
  - * and only use PB interface methods?
  - *
  - * @author <a href="mailto:armin@codeAuLait.de">Armin Waibel</a>
    * @version $Id$
    */
   public class QueryReferenceBroker
  @@ -330,7 +325,7 @@
                   }
   
                   ObjectReferenceDescriptor ord = (ObjectReferenceDescriptor) key;
  -                if (ord instanceof SuperReferenceDescriptor || ord.isLazy() || (ord.getItemProxyClass()
!= null))
  +                if (ord.isSuperReferenceDescriptor() || ord.isLazy() || (ord.getItemProxyClass()
!= null))
                   {
                       continue;
                   }
  @@ -664,8 +659,8 @@
        */
       private Query getFKQuery(Object obj, CollectionDescriptor cds)
       {
  -        Query fkQuery = null;
  -        QueryByCriteria fkQueryCrit = null;
  +        Query fkQuery;
  +        QueryByCriteria fkQueryCrit;
   
           if (cds.isMtoNRelation())
           {
  
  
  

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