public class ResultSetMappingQuery extends ObjectBuildingQuery
Purpose: Concrete class to perform read using raw SQL and the SQLResultSetMapping.
Responsibilities: Execute a selecting raw SQL string. Returns a List of results. Each item in the list will be another list consisting of the expected populated return types in the order they were specified in the SQLResultSetMapping
SQLResultSetMapping
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected SQLResultSetMapping |
resultSetMapping |
protected String |
resultSetMappingName |
DEFAULT_LOCK_MODE, executionTime, isPrePrepared, LOCK, LOCK_NOWAIT, LOCK_RESULT_PROPERTY, lockingClause, NO_LOCK, referenceClass, referenceClassName, shouldProcessResultsInUnitOfWork, shouldRefreshIdentityMapResult, shouldRefreshRemoteIdentityMapResult, shouldRegisterResultsInUnitOfWork, shouldUseExclusiveConnection, wasDefaultLockMode
firstResult, maxRows, 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 |
---|
ResultSetMappingQuery()
PUBLIC:
Initialize the state of the query.
|
ResultSetMappingQuery(Call call)
PUBLIC:
Initialize the query to use the specified call.
|
ResultSetMappingQuery(Call call,
String sqlResultSetMappingName)
PUBLIC:
Initialize the query to use the specified call and SQLResultSetMapping
|
Modifier and Type | Method and Description |
---|---|
protected List |
buildObjectsFromRecords(List databaseRecords)
INTERNAL:
This method is used to build the results.
|
Object |
clone()
INTERNAL:
Clone the query.
|
void |
convertClassNamesToClasses(ClassLoader classLoader)
INTERNAL:
Convert all the class-name-based settings in this ResultSetMapping to actual class-based
settings.
|
Object |
executeDatabaseQuery()
INTERNAL:
Executes the prepared query on the datastore.
|
SQLResultSetMapping |
getSQLResultSetMapping()
PUBLIC:
This will be the SQLResultSetMapping that is used by this query to process
the database results
|
String |
getSQLResultSetMappingName()
PUBLIC:
Return the result set mapping name.
|
protected void |
prepare()
INTERNAL:
Prepare the receiver for execution in a session.
|
void |
setSQLResultSetMapping(SQLResultSetMapping resultSetMapping)
PUBLIC:
This will be the SQLResultSetMapping that is used by this query to process
the database results
|
void |
setSQLResultSetMappingName(String name)
PUBLIC:
This will be the SQLResultSetMapping that is used by this query to process
the database results
|
dontRefreshIdentityMapResult, dontRefreshRemoteIdentityMapResult, getDataResults, getExecutionTime, getFetchGroup, getLockMode, getReferenceClass, getReferenceClassName, hasPartialAttributeExpressions, isAttributeJoined, isClonePessimisticLocked, isDefaultLock, isLockQuery, isObjectBuildingQuery, isRegisteringResults, recordCloneForPessimisticLocking, refreshIdentityMapResult, refreshRemoteIdentityMapResult, registerIndividualResult, setExecutionTime, setLockMode, setReferenceClass, setReferenceClassName, setShouldProcessResultsInUnitOfWork, setShouldRefreshIdentityMapResult, setShouldRefreshRemoteIdentityMapResult, setShouldRegisterResultsInUnitOfWork, setWasDefaultLockMode, shouldProcessResultsInUnitOfWork, shouldReadAllMappings, shouldReadMapping, shouldRefreshIdentityMapResult, shouldRefreshRemoteIdentityMapResult, shouldRegisterResultsInUnitOfWork, toString, wasDefaultLockMode
buildObject, clonedQueryExecutionComplete, getFirstResult, getMaxRows, getQueryId, isReadQuery, setFirstResult, setMaxRows, setQueryId
addArgument, addArgument, addArgument, addArgumentByTypeName, addArgumentValue, addArgumentValues, addCall, addStatement, bindAllParameters, buildSelectionCriteria, cacheStatement, cascadeAllParts, cascadeByMapping, cascadeOnlyDependentParts, cascadePrivateParts, checkDescriptor, checkEarlyReturn, checkForCustomQuery, checkPrepare, deploymentSetShouldMaintainCache, deploymentShouldMaintainCache, dontBindAllParameters, dontCacheStatement, dontCascadeParts, dontMaintainCache, execute, executeInUnitOfWork, getAccessor, getArguments, getArgumentTypeNames, getArgumentTypes, getArgumentValues, getCall, getCascadePolicy, getDatasourceCall, getDatasourceCalls, getDescriptor, getEJBQLString, getFlushOnExecute, getName, getProperties, getProperty, getQueryMechanism, 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, isObjectLevelModifyQuery, isObjectLevelReadQuery, isPrepared, isReadAllQuery, isReadObjectQuery, isReportQuery, isSQLCallQuery, isUpdateAllQuery, isUpdateObjectQuery, isUserDefined, isWriteObjectQuery, maintainCache, 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
protected String resultSetMappingName
protected SQLResultSetMapping resultSetMapping
public ResultSetMappingQuery()
public ResultSetMappingQuery(Call call)
public Object clone()
clone
in class DatabaseQuery
public void convertClassNamesToClasses(ClassLoader classLoader)
convertClassNamesToClasses
in class ObjectBuildingQuery
classLoader
- public void setSQLResultSetMapping(SQLResultSetMapping resultSetMapping)
public void setSQLResultSetMappingName(String name)
protected List buildObjectsFromRecords(List databaseRecords)
public Object executeDatabaseQuery() throws DatabaseException
executeDatabaseQuery
in class DatabaseQuery
DatabaseException
- - an error has occurred on the database.protected void prepare()
prepare
in class DatabaseQuery
public SQLResultSetMapping getSQLResultSetMapping()
public String getSQLResultSetMappingName()
Copyright © 2022. All rights reserved.