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 ResultSetAndStatement.java
Date Tue, 13 May 2003 07:56:24 GMT
arminw      2003/05/13 00:56:24

  Modified:    src/java/org/apache/ojb/broker/metadata
                        ObjectReferenceDescriptor.java
               src/java/org/apache/ojb/broker/accesslayer
                        ResultSetAndStatement.java
  Log:
  improvements posted by Lance Eason:
  
  * make logger static to avoid Logger instance lookup
  
  * 10) ObjectReferenceDescriptor.getItemProxyForClass uses whether the proxy is
  null or not as a test for whether it's been looked up.
  For classes that don't have a proxy though the proxy will always be null so
  it will do that lookup again every time the method is called.
  I changed it to have a boolean indicating whether the proxy had been
  looked up instead.
  
  Revision  Changes    Path
  1.25      +4 -1      db-ojb/src/java/org/apache/ojb/broker/metadata/ObjectReferenceDescriptor.java
  
  Index: ObjectReferenceDescriptor.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/metadata/ObjectReferenceDescriptor.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- ObjectReferenceDescriptor.java	2 May 2003 12:24:31 -0000	1.24
  +++ ObjectReferenceDescriptor.java	13 May 2003 07:56:24 -0000	1.25
  @@ -80,6 +80,8 @@
       private boolean m_CascadeStore = false;
       private boolean m_CascadeDelete = false;
       private Class m_ProxyOfItems = null;
  +    private boolean m_LookedUpProxy = false;
  +	
       /**
        * holds the foreign-key field descriptor array for a specified class
        */
  @@ -106,10 +108,11 @@
        */
       public Class getItemProxyClass() throws PersistenceBrokerException
       {
  -        if (m_ProxyOfItems == null)
  +        if (!m_LookedUpProxy)
           {
               m_ProxyOfItems = getClassDescriptor().getRepository().
                                   getDescriptorFor(m_ClassOfItems).getProxyClass();
  +            m_LookedUpProxy = true;
           }
           return m_ProxyOfItems;
       }
  
  
  
  1.6       +2 -2      db-ojb/src/java/org/apache/ojb/broker/accesslayer/ResultSetAndStatement.java
  
  Index: ResultSetAndStatement.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/ResultSetAndStatement.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ResultSetAndStatement.java	2 Feb 2003 03:32:47 -0000	1.5
  +++ ResultSetAndStatement.java	13 May 2003 07:56:24 -0000	1.6
  @@ -68,7 +68,7 @@
    */
   public class ResultSetAndStatement
   {
  -	private Logger log = LoggerFactory.getLogger(ResultSetAndStatement.class);
  +	private static Logger log = LoggerFactory.getLogger(ResultSetAndStatement.class);
   
   	private Platform m_platform = null;
   	public ResultSet m_rs = null;
  
  
  

Mime
View raw message