/** * Set the QueryResultsCachePolicy. * * @see org.eclipse.persistence.queries.QueryResultsCachePolicy */ public void setQueryResultsCachePolicy(QueryResultsCachePolicy policy) { queryResultCachingPolicy = policy; // ensure the cache is cleared if the caching policy is changed setIsPrepared(false); }
/** * Set the QueryResultsCachePolicy. * * @see org.eclipse.persistence.queries.QueryResultsCachePolicy */ public void setQueryResultsCachePolicy(QueryResultsCachePolicy policy) { queryResultCachingPolicy = policy; // ensure the cache is cleared if the caching policy is changed setIsPrepared(false); }
/** * Set the QueryResultsCachePolicy. * * @see org.eclipse.persistence.queries.QueryResultsCachePolicy */ public void setQueryResultsCachePolicy(QueryResultsCachePolicy policy) { queryResultCachingPolicy = policy; // ensure the cache is cleared if the caching policy is changed setIsPrepared(false); }
/** * 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 (!org.eclipse.persistence.internal.helper.CubaUtil.isSoftDeletion()) { ReadQuery query = (ReadQuery) getQuery().clone(); query.setIsPrepared(false); return session.executeQuery(query, getRow()); query.setIsPrepared(false); return session.executeQuery(query, getRow()); } else { try { ReadQuery query = (ReadQuery) getQuery().clone(); query.setIsPrepared(false); return session.executeQuery(query, getRow()); } finally {