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/accesslayer RsIterator.java RowReaderDefaultImpl.java ReferencePrefetcher.java
Date Sun, 31 Aug 2003 00:15:03 GMT
arminw      2003/08/30 17:15:03

  Modified:    src/java/org/apache/ojb/broker/accesslayer RsIterator.java
                        RowReaderDefaultImpl.java ReferencePrefetcher.java
  Log:
  - rename protected method getExtentClass
  to getTopLevelClass
  - fix javadoc typo
  - add more logging entry
  
  Revision  Changes    Path
  1.43      +12 -12    db-ojb/src/java/org/apache/ojb/broker/accesslayer/RsIterator.java
  
  Index: RsIterator.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/RsIterator.java,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- RsIterator.java	25 Aug 2003 19:28:27 -0000	1.42
  +++ RsIterator.java	31 Aug 2003 00:15:03 -0000	1.43
  @@ -130,9 +130,9 @@
       protected Class itemProxyClass;
   
       /**
  -     * the Extent of the item objects
  +     * the top-level class of the item objects
        */
  -    private Class itemExtentClass = null;
  +    private Class itemTopLevelClass = null;
   
       /**
        * this container holds the values of the current ro during materialisation
  @@ -155,10 +155,10 @@
        * return value of the previously called hasNext from m_rs
        */
       protected boolean hasNext = false;
  -    
  +
       /**
  -     * This is the place to add retrieval tasks that are grouped by 
  -     * ObjectReferenceDescriptors (keys) which are mapped to 
  +     * This is the place to add retrieval tasks that are grouped by
  +     * ObjectReferenceDescriptors (keys) which are mapped to
        * IdentityHashMaps mapping owner objects to itself (~IdentityHashSet).
        * After thit Iterator will be traversed, all the tasks will
        * be performed: related objects for the gathered owners will
  @@ -210,13 +210,13 @@
           prefetchRelationships(query);
       }
   
  -    protected Class getExtentClass()
  +    protected Class getTopLevelClass()
       {
  -        if (itemExtentClass == null)
  +        if (itemTopLevelClass == null)
           {
  -            itemExtentClass = m_broker.getTopLevelClass(m_cld.getClassOfObject());
  +            itemTopLevelClass = m_broker.getTopLevelClass(m_cld.getClassOfObject());
           }
  -        return itemExtentClass;
  +        return itemTopLevelClass;
       }
   
       /**
  @@ -288,7 +288,7 @@
       {
           throw new UnsupportedOperationException("removing not supported by RsIterator");
       }
  -    
  +
       public void setRetrievalTasks(HashMap retrievalTasks)
       {
           m_retrievalTasks = retrievalTasks;
  @@ -391,7 +391,7 @@
           }
   
           // return identity object build up from primary keys
  -        return new Identity(m_cld.getClassOfObject(), getExtentClass(), pkValues);
  +        return new Identity(m_cld.getClassOfObject(), getTopLevelClass(), pkValues);
       }
   
       /**
  
  
  
  1.22      +9 -3      db-ojb/src/java/org/apache/ojb/broker/accesslayer/RowReaderDefaultImpl.java
  
  Index: RowReaderDefaultImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/RowReaderDefaultImpl.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- RowReaderDefaultImpl.java	23 Jul 2003 20:07:33 -0000	1.21
  +++ RowReaderDefaultImpl.java	31 Aug 2003 00:15:03 -0000	1.22
  @@ -68,6 +68,7 @@
   import org.apache.ojb.broker.metadata.FieldDescriptor;
   import org.apache.ojb.broker.util.ConstructorHelper;
   import org.apache.ojb.broker.util.SqlHelper;
  +import org.apache.ojb.broker.util.logging.LoggerFactory;
   
   /**
    * @version $Id$
  @@ -198,6 +199,11 @@
                   ClassDescriptor result = m_cld.getRepository().getDescriptorFor(concreteClass);
                   if (result == null)
                   {
  +                    LoggerFactory.getDefaultLogger().warn(
  +                            "[" + RowReaderDefaultImpl.class.getName()
  +                            + "] Can not find class-descriptor for ojbConcreteClass " +
concreteClass
  +                            + ", use given class-descriptor '" + m_cld.getClassNameOfObject()
  +                            + "' instead");
                       result = m_cld;
                   }
                   return result;
  @@ -222,8 +228,8 @@
           Object result = null;
           FieldDescriptor fmd = null;
   
  -        // If either the factory class and/or factory method is null, 
  -        // just follow the normal code path and create via constructor 
  +        // If either the factory class and/or factory method is null,
  +        // just follow the normal code path and create via constructor
           if (null == targetClassDescriptor.getFactoryClass() || null == targetClassDescriptor.getFactoryMethod())
           {
               try
  
  
  
  1.7       +2 -2      db-ojb/src/java/org/apache/ojb/broker/accesslayer/ReferencePrefetcher.java
  
  Index: ReferencePrefetcher.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/ReferencePrefetcher.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ReferencePrefetcher.java	25 Aug 2003 19:28:27 -0000	1.6
  +++ ReferencePrefetcher.java	31 Aug 2003 00:15:03 -0000	1.7
  @@ -157,7 +157,7 @@
       }
   
       /**
  -	 * @see org.apache.ojb.broker.accesslayer.RelationshipPrefetcherImpl#buildPrefetchQuery(Collection)
  +	 * @see org.apache.ojb.broker.accesslayer.RelationshipPrefetcherImpl#buildPrefetchQueries(Collection)
   	 */
   	protected Query buildPrefetchQuery(Collection ids)
   	{
  
  
  

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