/** * PUBLIC: * Set the fetchSize setting that this query will set on the JDBC Statement * NB - a value of zero means that no call to statement.setFetchSize() will be made. */ public void setFetchSize(int fetchSize) { if ( isPrepared() && this.getCall()!=null) { getCall().setResultSetFetchSize(fetchSize); } this.fetchSize = fetchSize; }
/** * PUBLIC: * Set the fetchSize setting that this query will set on the JDBC Statement * NB - a value of zero means that no call to statement.setFetchSize() will be made. */ public void setFetchSize(int fetchSize) { if ( isPrepared() && this.getCall()!=null) { getCall().setResultSetFetchSize(fetchSize); } this.fetchSize = fetchSize; }
/** * PUBLIC: * Used to set the limit for the maximum number of rows that any ResultSet can contain to the given number. * This method should only be set once per query. To change the max rows use another query. * This method limits the number of candidate results returned to TopLink that can be used to build objects */ public void setMaxRows(int maxRows) { if ( isPrepared() && this.maxRows != maxRows){ if ( this.getCall()!=null && this.getCall().shouldIgnoreMaxResultsSetting() && this.maxRows>0 ){ }else{ setIsPrepared(false); } } this.maxRows = maxRows; shouldCloneCall=true; }
/** * PUBLIC: * Used to set the limit for the maximum number of rows that any ResultSet can contain to the given number. * This method should only be set once per query. To change the max rows use another query. * This method limits the number of candidate results returned to TopLink that can be used to build objects */ public void setMaxRows(int maxRows) { if ( isPrepared() && this.maxRows != maxRows){ if ( this.getCall()!=null && this.getCall().shouldIgnoreFirstRowMaxResultsSettings() && this.maxRows>0 ){ }else{ setIsPrepared(false); } } this.maxRows = maxRows; shouldCloneCall=true; }
/** * PUBLIC: * Used to set the limit for the maximum number of rows that any ResultSet can contain to the given number. * This method should only be set once per query. To change the max rows use another query. * This method limits the number of candidate results returned to TopLink that can be used to build objects */ public void setMaxRows(int maxRows) { if ( isPrepared() && this.maxRows != maxRows){ if ( this.getCall()!=null && this.getCall().shouldIgnoreMaxResultsSetting() && this.maxRows>0 ){ }else{ setIsPrepared(false); } } this.maxRows = maxRows; shouldCloneCall=true; }
/** * PUBLIC: * Used to set the first result in any result set that is returned for this query. * On supported database platforms this will cause the query to issue specific SQL * that avoids selecting the firstResult number of rows. * Otherwise by it will use the JDBC absolute to skip the firstResult number of rows. */ public void setFirstResult(int firstResult) { if (isPrepared() && this.firstResult != firstResult) { if (getCall()!=null && getCall().shouldIgnoreFirstRowSetting()) { // Don't need to reprepare as firstResult is already built into the sql if ignoreFirstRowMaxResultsSettings is set, // firstResult is just a query parameter. } else { setIsPrepared(false); } } this.firstResult = firstResult; this.shouldCloneCall = true; }
/** * PUBLIC: * Used to set the first result in any result set that is returned for this query. * On supported database platforms this will cause the query to issue specific SQL * that avoids selecting the firstResult number of rows. * Otherwise by it will use the JDBC absolute to skip the firstResult number of rows. */ public void setFirstResult(int firstResult) { if (isPrepared() && this.firstResult != firstResult) { if (getCall()!=null && getCall().shouldIgnoreFirstRowMaxResultsSettings()) { // Don't need to reprepare as firstResult is already built into the sql if ignoreFirstRowMaxResultsSettings is set, // firstResult is just a query parameter. } else { setIsPrepared(false); } } this.firstResult = firstResult; this.shouldCloneCall = true; }
/** * PUBLIC: * Used to set the first result in any result set that is returned for this query. * On supported database platforms this will cause the query to issue specific SQL * that avoids selecting the firstResult number of rows. * Otherwise by it will use the JDBC absolute to skip the firstResult number of rows. */ public void setFirstResult(int firstResult) { if (isPrepared() && this.firstResult != firstResult) { if (getCall()!=null && getCall().shouldIgnoreFirstRowSetting()) { // Don't need to reprepare as firstResult is already built into the sql if ignoreFirstRowMaxResultsSettings is set, // firstResult is just a query parameter. } else { setIsPrepared(false); } } this.firstResult = firstResult; this.shouldCloneCall = true; }
if (executionSession.isHistoricalSession() && !targetQuery.isPrepared()) { targetQuery = (ObjectLevelReadQuery)targetQuery.clone(); targetQuery.setIsExecutionClone(true);
if (executionSession.isHistoricalSession() && !targetQuery.isPrepared()) { targetQuery = (ObjectLevelReadQuery)targetQuery.clone(); targetQuery.setIsExecutionClone(true);