public class DataReadQuery extends ReadQuery
Purpose: Concrete class to perform read using raw SQL.
Responsibilities: Execute a selecting raw SQL string. This returns a Collection of the DatabaseRows representing the result set.
| Modifier and Type | Field and Description |
|---|---|
protected ContainerPolicy |
containerPolicy |
protected boolean |
useAbstractRecord |
firstResult, maxRows, queryIdaccessor, 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, translationRowFalse, True, Undefined| Constructor and Description |
|---|
DataReadQuery()
PUBLIC:
Initialize the state of the query.
|
DataReadQuery(Call call)
PUBLIC:
Initialize the query to use the specified call.
|
DataReadQuery(java.lang.String sqlString)
PUBLIC:
Initialize the query to use the specified SQL string.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
INTERNAL:
Clone the query.
|
java.lang.Object |
executeDatabaseQuery()
INTERNAL:
Execute the query.
|
protected java.lang.Object |
executeNonCursor()
INTERNAL:
The results are *not* in a cursor, build the collection.
|
ContainerPolicy |
getContainerPolicy()
PUBLIC:
Return the query's ContainerPolicy.
|
boolean |
isDataReadQuery()
PUBLIC:
Return if this is a data read query.
|
protected void |
prepare()
INTERNAL:
Prepare the receiver for execution in a session.
|
void |
prepareForExecution()
INTERNAL:
Prepare the receiver for execution in a session.
|
void |
setContainerPolicy(ContainerPolicy containerPolicy)
PUBLIC:
Set the container policy.
|
void |
setUseAbstractRecord(boolean useAbstractRecord)
INTERNAL:
Allow changing the default behaviour so that AbstractRecords are not returned as query results.
|
void |
useCollectionClass(java.lang.Class concreteClass)
PUBLIC:
Configure the query to use an instance of the specified container class
to hold the target objects.
|
buildObject, clonedQueryExecutionComplete, getFirstResult, getMaxRows, getQueryId, isReadQuery, setFirstResult, setMaxRows, setQueryIdaddArgument, addArgument, addArgument, addArgumentByTypeName, addArgumentValue, addArgumentValues, addCall, addStatement, bindAllParameters, buildSelectionCriteria, cacheStatement, cascadeAllParts, cascadeByMapping, cascadeOnlyDependentParts, cascadePrivateParts, checkDescriptor, checkEarlyReturn, checkForCustomQuery, checkPrepare, convertClassNamesToClasses, deploymentSetShouldMaintainCache, deploymentShouldMaintainCache, dontBindAllParameters, dontCacheStatement, dontCascadeParts, dontMaintainCache, execute, 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, isDeleteAllQuery, isDeleteObjectQuery, isExpressionQuery, isInsertObjectQuery, isModifyAllQuery, isModifyQuery, isObjectBuildingQuery, isObjectLevelModifyQuery, isObjectLevelReadQuery, isPrepared, isReadAllQuery, isReadObjectQuery, isReportQuery, isSQLCallQuery, isUpdateAllQuery, isUpdateObjectQuery, isUserDefined, isWriteObjectQuery, maintainCache, prepareCall, prepareCustomQuery, 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, toStringprotected ContainerPolicy containerPolicy
protected boolean useAbstractRecord
public DataReadQuery()
public DataReadQuery(java.lang.String sqlString)
public DataReadQuery(Call call)
public java.lang.Object clone()
clone in class DatabaseQuerypublic java.lang.Object executeDatabaseQuery()
throws DatabaseException
executeDatabaseQuery in class DatabaseQueryDatabaseException - an error has occurred on the databaseprotected java.lang.Object executeNonCursor()
throws DatabaseException
DatabaseExceptionpublic ContainerPolicy getContainerPolicy()
public boolean isDataReadQuery()
isDataReadQuery in class DatabaseQueryprotected void prepare()
prepare in class DatabaseQuerypublic void prepareForExecution()
throws QueryException
prepareForExecution in class DatabaseQueryQueryExceptionpublic void setContainerPolicy(ContainerPolicy containerPolicy)
public void useCollectionClass(java.lang.Class concreteClass)
public void setUseAbstractRecord(boolean useAbstractRecord)