public abstract class ReadQuery extends DatabaseQuery
Purpose: Abstract class for all read queries.
Responsibilities:
Modifier and Type | Field and Description |
---|---|
protected int |
firstResult
Used to start query results at a specific result
|
protected int |
maxRows
Used for retrieve limited rows through the query.
|
protected long |
queryId |
accessor, arguments, argumentTypeNames, argumentTypes, argumentValues, CascadeAggregateDelete, CascadeAllParts, CascadeByMapping, CascadeDependentParts, cascadePolicy, CascadePrivateParts, descriptor, flushOnExecute, isPrepared, isUserDefined, name, NoCascading, properties, queryMechanism, session, sessionName, shouldBindAllParameters, shouldCacheStatement, shouldCloneCall, shouldMaintainCache, shouldPrepare, shouldUseWrapperPolicy, translationRow
False, True, Undefined
Constructor and Description |
---|
ReadQuery()
PUBLIC:
Initialize the state of the query
|
Modifier and Type | Method and Description |
---|---|
Object |
buildObject(AbstractRecord row)
INTERNAL:
By default return the row.
|
protected void |
clonedQueryExecutionComplete(DatabaseQuery query,
AbstractSession session)
INTERNAL
Used to give the subclasses oportunity to copy aspects of the cloned query
to the original query.
|
int |
getFirstResult()
PUBLIC:
Return the value that will be set for the firstResult in the returned result set
|
int |
getMaxRows()
PUBLIC:
Return the limit for the maximum number of rows that any ResultSet can contain to the given number.
|
long |
getQueryId()
INTERNAL:
This method is used to get the time in millis that this query is being executed at.
|
boolean |
isReadQuery()
PUBLIC:
Return if this is a read query.
|
void |
setFirstResult(int firstResult)
PUBLIC:
Used to set the first result in any result set that is returned for this query.
|
void |
setMaxRows(int maxRows)
PUBLIC:
Used to set the limit for the maximum number of rows that any ResultSet can contain to the given number.
|
void |
setQueryId(long id)
INTERNAL:
This method is used to set the current system time in millis that this query is being executed at.
|
addArgument, addArgument, addArgument, addArgumentByTypeName, addArgumentValue, addArgumentValues, addCall, addStatement, bindAllParameters, buildSelectionCriteria, cacheStatement, cascadeAllParts, cascadeByMapping, cascadeOnlyDependentParts, cascadePrivateParts, checkDescriptor, checkEarlyReturn, checkForCustomQuery, checkPrepare, clone, convertClassNamesToClasses, deploymentSetShouldMaintainCache, deploymentShouldMaintainCache, dontBindAllParameters, dontCacheStatement, dontCascadeParts, dontMaintainCache, execute, executeDatabaseQuery, executeInUnitOfWork, getAccessor, getArguments, getArgumentTypeNames, getArgumentTypes, getArgumentValues, getCall, getCascadePolicy, getDatasourceCall, getDatasourceCalls, getDescriptor, getEJBQLString, getFlushOnExecute, getName, getProperties, getProperty, getQueryMechanism, getReferenceClass, getReferenceClassName, getSelectionCriteria, getSession, getSessionName, getShouldBindAllParameters, getSQLStatement, getSQLString, getSQLStrings, getTranslatedSQLString, getTranslatedSQLStrings, getTranslationRow, hasAccessor, hasProperties, hasQueryMechanism, hasSessionName, ignoreBindAllParameters, ignoreCacheStatement, isCallQuery, isCascadeOfAggregateDelete, isDataModifyQuery, isDataReadQuery, isDeleteAllQuery, isDeleteObjectQuery, isExpressionQuery, isInsertObjectQuery, isModifyAllQuery, isModifyQuery, isObjectBuildingQuery, isObjectLevelModifyQuery, isObjectLevelReadQuery, isPrepared, isReadAllQuery, isReadObjectQuery, isReportQuery, isSQLCallQuery, isUpdateAllQuery, isUpdateObjectQuery, isUserDefined, isWriteObjectQuery, maintainCache, prepare, prepareCall, prepareCustomQuery, prepareForExecution, prepareForRemoteExecution, removeProperty, rowFromArguments, setAccessor, setArguments, setArgumentTypeNames, setArgumentTypes, setArgumentValues, setCall, setCascadePolicy, setDatasourceCall, setDescriptor, setEJBQLString, setFlushOnExecute, setIsPrepared, setIsUserDefined, setName, setProperties, setProperty, setQueryMechanism, setSelectionCriteria, setSession, setSessionName, setShouldBindAllParameters, setShouldBindAllParameters, setShouldCacheStatement, setShouldMaintainCache, setShouldPrepare, setShouldUseWrapperPolicy, setSQLStatement, setSQLString, setTranslationRow, shouldBindAllParameters, shouldCacheStatement, shouldCascadeAllParts, shouldCascadeByMapping, shouldCascadeOnlyDependentParts, shouldCascadeParts, shouldCascadePrivateParts, shouldCloneCall, shouldIgnoreBindAllParameters, shouldIgnoreCacheStatement, shouldMaintainCache, shouldPrepare, shouldUseWrapperPolicy, toString
protected int maxRows
protected int firstResult
protected long queryId
public Object buildObject(AbstractRecord row)
protected void clonedQueryExecutionComplete(DatabaseQuery query, AbstractSession session)
clonedQueryExecutionComplete
in class DatabaseQuery
public int getFirstResult()
public long getQueryId()
public int getMaxRows()
public boolean isReadQuery()
isReadQuery
in class DatabaseQuery
public void setFirstResult(int firstResult)
public void setQueryId(long id)
public void setMaxRows(int maxRows)
Copyright © 2022. All rights reserved.