db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/accesslayer CollectionProxy.java
Date Tue, 17 Jun 2003 17:52:14 GMT
thma        2003/06/17 10:52:14

  Modified:    src/java/org/apache/ojb/broker/accesslayer
                        CollectionProxy.java
  Log:
  applying Olli's high performance patch!
  
  Revision  Changes    Path
  1.20      +11 -7     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.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- CollectionProxy.java	2 May 2003 18:10:15 -0000	1.19
  +++ CollectionProxy.java	17 Jun 2003 17:52:13 -0000	1.20
  @@ -135,12 +135,16 @@
   	{
   		try
   		{
  -			Collection result = (Collection) getCollectionClass().newInstance();
  -			if (!isEmpty())
  -			{
  -				result = (Collection)getBroker().getCollectionByQuery(getCollectionClass(),getQuery());
  -			}
  -			return result;
  +			Collection result;
  +      		if (m_size != 0)
  +      		{
  +        		result = (Collection) getBroker().getCollectionByQuery(getCollectionClass(),getQuery());
  +      		}
  +      		else
  +      		{
  +      			result = (Collection) getCollectionClass().newInstance();
  +      		}			
  +			return result;			
   		}
   		catch (Exception ex)
   		{
  
  
  

Mime
View raw message