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/accesslayer CollectionProxy.java
Date Fri, 02 May 2003 18:10:15 GMT
brj         2003/05/02 11:10:15

  Modified:    src/java/org/apache/ojb/broker/accesslayer
                        CollectionProxy.java
  Log:
  minor refactoring
  
  Revision  Changes    Path
  1.19      +27 -27    db-ojb/src/java/org/apache/ojb/broker/accesslayer/CollectionProxy.java
  
  Index: CollectionProxy.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/CollectionProxy.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- CollectionProxy.java	2 May 2003 12:24:32 -0000	1.18
  +++ CollectionProxy.java	2 May 2003 18:10:15 -0000	1.19
  @@ -78,12 +78,12 @@
    */
   public class CollectionProxy implements Collection, ManageableCollection
   {
  -	private transient PersistenceBroker broker;
  -	private PBKey brokerKey;
  -	private Query query;
  -	private Collection data;
  -	private Class collectionClass;
  -	private int size = -1;
  +	private transient PersistenceBroker m_broker;
  +	private PBKey m_brokerKey;
  +	private Query m_query;
  +	private Collection m_data;
  +	private Class m_collectionClass;
  +	private int m_size = -1;
       /*
       arminw
       fix a bug, caused by closing PB instances
  @@ -106,7 +106,7 @@
   
   	public boolean isLoaded()
   	{
  -		return data != null;
  +		return m_data != null;
   	}
   
   	/**
  @@ -116,7 +116,7 @@
   	{
   		try
   		{
  -			size = getBroker().getCount(getQuery());
  +			m_size = getBroker().getCount(getQuery());
   		}
   		catch (Exception ex)
   		{
  @@ -163,11 +163,11 @@
   		}
   		else
   		{
  -			if (size < 0)
  +			if (m_size < 0)
   			{
   				loadSize();
   			}
  -			return size;
  +			return m_size;
   		}
   	}
   
  @@ -278,7 +278,7 @@
   			coll = new ArrayList();
   		}
           setData(coll);
  -        size = 0;
  +        m_size = 0;
   
   	}
   
  @@ -288,7 +288,7 @@
   	 */
   	protected Query getQuery()
   	{
  -		return query;
  +		return m_query;
   	}
   
   	/**
  @@ -297,7 +297,7 @@
   	 */
   	protected void setQuery(Query query)
   	{
  -		this.query = query;
  +		this.m_query = query;
   	}
   
   
  @@ -312,11 +312,11 @@
           it from the PBF, do nothing if we obtain it from
           PBThreadMapping
           */
  -        if (broker != null && needsClose)
  +        if (m_broker != null && needsClose)
           {
               needsClose = false;
  -            broker.close();
  -        	broker = null;
  +            m_broker.close();
  +        	m_broker = null;
           }
       }
   
  @@ -344,20 +344,20 @@
           }
   
           // the current broker not found, create a new one
  -	    if (broker == null)
  +	    if (m_broker == null)
   	    {
   	    	if (getBrokerKey() != null)
   	    	{
  -				broker = PersistenceBrokerFactory.createPersistenceBroker(getBrokerKey());
  +				m_broker = PersistenceBrokerFactory.createPersistenceBroker(getBrokerKey());
   	    	}
   	    	else
   	    	{
  -				broker = PersistenceBrokerFactory.defaultPersistenceBroker();
  +				m_broker = PersistenceBrokerFactory.defaultPersistenceBroker();
   	    	}
               // TODO: Better way?
               needsClose = true;
   	    }
  -		return broker;
  +		return m_broker;
   	}
   
   	/**
  @@ -371,7 +371,7 @@
   			setData(loadData());
   		}
   
  -		return data;
  +		return m_data;
   	}
   
   	/**
  @@ -380,7 +380,7 @@
   	 */
   	protected void setData(Collection data)
   	{
  -		this.data = data;
  +		this.m_data = data;
   	}
   
   	/**
  @@ -389,7 +389,7 @@
   	 */
   	protected Class getCollectionClass()
   	{
  -		return collectionClass;
  +		return m_collectionClass;
   	}
   
   	/**
  @@ -398,7 +398,7 @@
   	 */
   	protected void setCollectionClass(Class collectionClass)
   	{
  -		this.collectionClass = collectionClass;
  +		this.m_collectionClass = collectionClass;
   	}
   
   	/**
  @@ -435,7 +435,7 @@
   	 */
   	protected PBKey getBrokerKey()
   	{
  -		return brokerKey;
  +		return m_brokerKey;
   	}
   
   	/**
  @@ -444,7 +444,7 @@
   	 */
   	protected void setBrokerKey(PBKey brokerKey)
   	{
  -		this.brokerKey = brokerKey;
  +		this.m_brokerKey = brokerKey;
   	}
   
   }
  
  
  

Mime
View raw message