Scarab commit: svn commit: r10842 - branches/release/0.22/src/java/org/tigris/scarab/search/CachedQuery.java

Johannes Höchstädter <[email protected]>
Newsgroups gmane.comp.java.scarab.cvs
Message-ID <[email protected]>
Author: jhoech
Date: 2009-08-04 05:38:26-0700
New Revision: 10842

Modified:
   branches/release/0.22/src/java/org/tigris/scarab/search/CachedQuery.java

Log:
FIX - SCB2983 Limitation of 1000 Qeury results removed from CachedQuery (value is set to -1). Maybe there are some more revisions necessary here, but for me it fixes the mentioned issue.

Modified: branches/release/0.22/src/java/org/tigris/scarab/search/CachedQuery.java
Url: http://scarab.tigris.org/source/browse/scarab/branches/release/0.22/src/java/org/tigris/scarab/search/CachedQuery.java?view=diff&pathrev=10842&r1=10841&r2=10842
==============================================================================
--- branches/release/0.22/src/java/org/tigris/scarab/search/CachedQuery.java	(original)
+++ branches/release/0.22/src/java/org/tigris/scarab/search/CachedQuery.java	2009-08-04 05:38:26-0700
@@ -12,7 +12,7 @@
 
 public class CachedQuery {
     private static final char DOT_REPLACEMENT_IN_JOIN_CONDITION = '#';
-	private static final int MAXIMUM_INITIAL_ROWS = 1000;
+	
 	private static final String LOGGER = "org.apache.torque";
 
     private Criteria criteria;
@@ -73,7 +73,7 @@
     		{
 				if(!countOnly)
 	    		{
-	    	        criteria.setLimit(MAXIMUM_INITIAL_ROWS).setOffset(0);
+	    	        criteria.setLimit(-1).setOffset(0);
 	    	    	String sql = adjustSelectSql(BasePeer.createQueryString(criteria));
 	    		    cachedRows = executeSelect(sql);
 	    		}	    		
@@ -82,7 +82,7 @@
 	
 	            totalRowCount = cachedRows.size(); 
     		
-			    if(countOnly || cachedRows.size()==MAXIMUM_INITIAL_ROWS)
+			    if(countOnly)
 			    {
 	    	        criteria.setLimit(-1).setOffset(0);
 	    	    	String sql = adjustSelectSql(BasePeer.createQueryString(criteria));

------------------------------------------------------
http://scarab.tigris.org/ds/viewMessage.do?dsForumId=3577&dsMessageId=2379978
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.