cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r675542 - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src: main/java/org/apache/cayenne/access/ main/java/org/apache/cayenne/access/jdbc/ main/java/org/apache/cayenne/cache/ main/java/org/apache/cayenne/dba/hsqldb/ main/java...
Date Thu, 10 Jul 2008 12:18:43 GMT
Author: aadamchik
Date: Thu Jul 10 05:18:42 2008
New Revision: 675542

URL: http://svn.apache.org/viewvc?rev=675542&view=rev
Log:
CAY-1068 Add support for start index/offset of queries
(refactoring to ensure consistent naming of the new feature - "fetch offset")

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ClientServerChannelQueryAction.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomainQuery.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ObjectStore.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/JDBCResultIterator.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/cache/NestedQueryCache.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLSelectTranslator.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/mysql/MySQLSelectTranslator.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleSelectTranslator.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/postgres/PostgresSelectTranslator.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/BaseQueryMetadata.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/DefaultQueryMetadata.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/QueryMetadata.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/QueryMetadataWrapper.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/SelectQuery.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/IncrementalQuery.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/IncrementalSelectQuery.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/RangeQuery.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/MockQueryMetadata.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ClientServerChannelQueryAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ClientServerChannelQueryAction.java?rev=675542&r1=675541&r2=675542&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ClientServerChannelQueryAction.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ClientServerChannelQueryAction.java
Thu Jul 10 05:18:42 2008
@@ -76,7 +76,7 @@
     private boolean interceptSinglePageQuery() {
 
         // retrieve range from the previously cached list
-        if (serverMetadata.getFetchStartIndex() >= 0
+        if (serverMetadata.getFetchOffset() >= 0
                 && serverMetadata.getFetchLimit() > 0
                 && serverMetadata.getCacheKey() != null) {
 
@@ -101,7 +101,7 @@
                 }
             }
 
-            int startIndex = serverMetadata.getFetchStartIndex();
+            int startIndex = serverMetadata.getFetchOffset();
             int endIndex = startIndex + serverMetadata.getFetchLimit();
 
             // send back just one page... query sender will figure out where it fits in

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomainQuery.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomainQuery.java?rev=675542&r1=675541&r2=675542&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomainQuery.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomainQuery.java
Thu Jul 10 05:18:42 2008
@@ -102,9 +102,16 @@
         return 0;
     }
 
-    public int getFetchStartIndex() {
+    public int getFetchOffset() {
         return 0;
     }
+    
+    /**
+     * @deprecated since 3.0
+     */
+    public int getFetchStartIndex() {
+        return getFetchOffset();
+    }
 
     public ObjEntity getObjEntity() {
         return null;

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ObjectStore.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ObjectStore.java?rev=675542&r1=675541&r2=675542&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ObjectStore.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ObjectStore.java
Thu Jul 10 05:18:42 2008
@@ -1195,9 +1195,16 @@
             return 0;
         }
 
-        public int getFetchStartIndex() {
+        public int getFetchOffset() {
             return 0;
         }
+        
+        /**
+         * @deprecated since 3.0
+         */
+        public int getFetchStartIndex() {
+            return getFetchOffset();
+        }
 
         public ObjEntity getObjEntity() {
             return null;

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/JDBCResultIterator.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/JDBCResultIterator.java?rev=675542&r1=675541&r2=675542&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/JDBCResultIterator.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/JDBCResultIterator.java
Thu Jul 10 05:18:42 2008
@@ -73,6 +73,8 @@
 
     /**
      * Creates new JDBCResultIterator that reads from provided ResultSet.
+     * 
+     * @since 3.0
      */
     public JDBCResultIterator(Connection connection, Statement statement,
             ResultSet resultSet, RowDescriptor descriptor, int fetchLimit, int fetchOffset)

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/cache/NestedQueryCache.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/cache/NestedQueryCache.java?rev=675542&r1=675541&r2=675542&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/cache/NestedQueryCache.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/cache/NestedQueryCache.java
Thu Jul 10 05:18:42 2008
@@ -159,6 +159,13 @@
             return mdDelegate.getFetchLimit();
         }
 
+        public int getFetchOffset() {
+            return mdDelegate.getFetchOffset();
+        }
+        
+        /**
+         * @deprecated since 3.0
+         */
         public int getFetchStartIndex() {
             return mdDelegate.getFetchStartIndex();
         }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLSelectTranslator.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLSelectTranslator.java?rev=675542&r1=675541&r2=675542&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLSelectTranslator.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLSelectTranslator.java
Thu Jul 10 05:18:42 2008
@@ -34,7 +34,7 @@
         QueryMetadata metadata = getQuery().getMetaData(getEntityResolver());
         
         // limit results
-        int offset = metadata.getFetchStartIndex();
+        int offset = metadata.getFetchOffset();
         int limit = metadata.getFetchLimit();
         
         if (offset > 0 || limit > 0) {

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/mysql/MySQLSelectTranslator.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/mysql/MySQLSelectTranslator.java?rev=675542&r1=675541&r2=675542&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/mysql/MySQLSelectTranslator.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/mysql/MySQLSelectTranslator.java
Thu Jul 10 05:18:42 2008
@@ -34,7 +34,7 @@
         QueryMetadata metadata = getQuery().getMetaData(getEntityResolver());
         
         // limit results
-        int offset = metadata.getFetchStartIndex();
+        int offset = metadata.getFetchOffset();
         int limit = metadata.getFetchLimit();
         
         if (offset > 0 || limit > 0) {

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleSelectTranslator.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleSelectTranslator.java?rev=675542&r1=675541&r2=675542&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleSelectTranslator.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleSelectTranslator.java
Thu Jul 10 05:18:42 2008
@@ -38,14 +38,14 @@
         String sqlString = super.createSqlString();
 
         QueryMetadata info = getQuery().getMetaData(getEntityResolver());
-        if (info.getFetchLimit() > 0 || info.getFetchStartIndex() > 0) {
-            int max = (info.getFetchLimit() == 0)? Integer.MAX_VALUE : (info.getFetchLimit()
+ info.getFetchStartIndex());
+        if (info.getFetchLimit() > 0 || info.getFetchOffset() > 0) {
+            int max = (info.getFetchLimit() == 0)? Integer.MAX_VALUE : (info.getFetchLimit()
+ info.getFetchOffset());
             
             sqlString = "select * " + 
             "from ( select " +
                     "tid.*, ROWNUM rnum " + 
                         "from (" + sqlString +  ") tid " + 
-                        "where ROWNUM <=" + max + ") where rnum  > " + info.getFetchStartIndex();

+                        "where ROWNUM <=" + max + ") where rnum  > " + info.getFetchOffset();

         }
 
         return sqlString;

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/postgres/PostgresSelectTranslator.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/postgres/PostgresSelectTranslator.java?rev=675542&r1=675541&r2=675542&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/postgres/PostgresSelectTranslator.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/postgres/PostgresSelectTranslator.java
Thu Jul 10 05:18:42 2008
@@ -34,7 +34,7 @@
         QueryMetadata metadata = getQuery().getMetaData(getEntityResolver());
         
      // limit results
-        int offset = metadata.getFetchStartIndex();
+        int offset = metadata.getFetchOffset();
         int limit = metadata.getFetchLimit();
         
         if (offset > 0 || limit > 0) {

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/BaseQueryMetadata.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/BaseQueryMetadata.java?rev=675542&r1=675541&r2=675542&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/BaseQueryMetadata.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/BaseQueryMetadata.java
Thu Jul 10 05:18:42 2008
@@ -438,9 +438,18 @@
         return null;
     }
 
+    /**
+     * @since 3.0
+     */
+    public int getFetchOffset() {
+        return fetchStartIndex;
+    }
     
+    /**
+     * @deprecated since 3.0
+     */
     public int getFetchStartIndex() {
-        return fetchStartIndex;
+        return getFetchOffset();
     }
 
     public boolean isRefreshingObjects() {

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/DefaultQueryMetadata.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/DefaultQueryMetadata.java?rev=675542&r1=675541&r2=675542&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/DefaultQueryMetadata.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/DefaultQueryMetadata.java
Thu Jul 10 05:18:42 2008
@@ -126,9 +126,16 @@
         return QueryMetadata.PAGE_SIZE_DEFAULT;
     }
 
-    public int getFetchStartIndex() {
+    public int getFetchOffset() {
         return -1;
     }
+    
+    /**
+     * @deprecated since 3.0
+     */
+    public int getFetchStartIndex() {
+        return getFetchOffset();
+    }
 
     public int getFetchLimit() {
         return QueryMetadata.FETCH_LIMIT_DEFAULT;

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/QueryMetadata.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/QueryMetadata.java?rev=675542&r1=675541&r2=675542&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/QueryMetadata.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/QueryMetadata.java
Thu Jul 10 05:18:42 2008
@@ -84,7 +84,10 @@
     public static final int FETCH_LIMIT_DEFAULT = 0;
     
     /**
-     * Defines default query fetch start index, which is 0, meaning that matching rows selected
starting from the first.
+     * Defines default query fetch start index, which is 0, meaning that matching rows
+     * selected starting from the first.
+     * 
+     * @since 3.0
      */
     public static final int FETCH_START_INDEX_DEFAULT = 0;
 
@@ -220,8 +223,14 @@
     int getPageSize();
 
     /**
-     * Specifies a start of a range when fetching a subset of records. The last index is
-     * determined by {@link #getFetchLimit()}.
+     * Specifies a start of a range when fetching a subset of records.
+     * 
+     * @since 3.0
+     */
+    int getFetchOffset();
+    
+    /**
+     * @deprecated since 3.0, renamed to {@link #getFetchOffset()}.
      */
     int getFetchStartIndex();
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/QueryMetadataWrapper.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/QueryMetadataWrapper.java?rev=675542&r1=675541&r2=675542&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/QueryMetadataWrapper.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/QueryMetadataWrapper.java
Thu Jul 10 05:18:42 2008
@@ -168,8 +168,15 @@
         return n != null ? n.intValue() : 0;
     }
 
+    public int getFetchOffset() {
+        return info.getFetchOffset();
+    }
+    
+    /**
+     * @deprecated since 3.0
+     */
     public int getFetchStartIndex() {
-        return info.getFetchStartIndex();
+        return getFetchOffset();
     }
 
     public int getFetchLimit() {

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/SelectQuery.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/SelectQuery.java?rev=675542&r1=675541&r2=675542&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/SelectQuery.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/SelectQuery.java
Thu Jul 10 05:18:42 2008
@@ -596,9 +596,11 @@
     
     /**
      * Returns the fetchOffset.
+     * 
+     * @since 3.0
      */
     public int getFetchOffset() {
-        return metaData.getFetchStartIndex();
+        return metaData.getFetchOffset();
     }
     
     /**
@@ -615,6 +617,9 @@
         this.metaData.setFetchLimit(fetchLimit);
     }
     
+    /**
+     * @since 3.0
+     */
     public void setFetchOffset(int fetchOffset) {
         this.metaData.setFetchStartIndex(fetchOffset);
     }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/IncrementalQuery.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/IncrementalQuery.java?rev=675542&r1=675541&r2=675542&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/IncrementalQuery.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/IncrementalQuery.java
Thu Jul 10 05:18:42 2008
@@ -106,6 +106,13 @@
                 return metadata.getFetchLimit();
             }
 
+            public int getFetchOffset() {
+                return metadata.getFetchOffset();
+            }
+            
+            /**
+             * @deprecated since 3.0
+             */
             public int getFetchStartIndex() {
                 return metadata.getFetchStartIndex();
             }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/IncrementalSelectQuery.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/IncrementalSelectQuery.java?rev=675542&r1=675541&r2=675542&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/IncrementalSelectQuery.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/IncrementalSelectQuery.java
Thu Jul 10 05:18:42 2008
@@ -111,6 +111,13 @@
                 return metadata.getFetchLimit();
             }
 
+            public int getFetchOffset() {
+                return metadata.getFetchOffset();
+            }
+            
+            /**
+             * @deprecated since 3.0
+             */
             public int getFetchStartIndex() {
                 return metadata.getFetchStartIndex();
             }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/RangeQuery.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/RangeQuery.java?rev=675542&r1=675541&r2=675542&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/RangeQuery.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/RangeQuery.java
Thu Jul 10 05:18:42 2008
@@ -46,7 +46,7 @@
 class RangeQuery implements Query {
 
     private String cacheKey;
-    private int fetchStartIndex;
+    private int fetchOffset;
     private int fetchLimit;
     private Query originatingQuery;
 
@@ -63,7 +63,7 @@
     RangeQuery(String cacheKey, int fetchStartIndex, int fetchLimit,
             Query originatingQuery) {
         this.cacheKey = cacheKey;
-        this.fetchStartIndex = fetchStartIndex;
+        this.fetchOffset = fetchStartIndex;
         this.fetchLimit = fetchLimit;
         this.originatingQuery = originatingQuery;
     }
@@ -89,8 +89,15 @@
                 return null;
             }
 
+            public int getFetchOffset() {
+                return fetchOffset;
+            }
+            
+            /**
+             * @deprecated since 3.0
+             */
             public int getFetchStartIndex() {
-                return fetchStartIndex;
+                return getFetchOffset();
             }
 
             public int getFetchLimit() {

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/MockQueryMetadata.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/MockQueryMetadata.java?rev=675542&r1=675541&r2=675542&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/MockQueryMetadata.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/MockQueryMetadata.java
Thu Jul 10 05:18:42 2008
@@ -92,9 +92,16 @@
         return 0;
     }
     
-    public int getFetchStartIndex() {
+    public int getFetchOffset() {
         return -1;
     }
+    
+    /**
+     * @deprecated since 3.0
+     */
+    public int getFetchStartIndex() {
+        return getFetchOffset();
+    }
 
     public int getFetchLimit() {
         return 0;



Mime
View raw message