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 FormDEFAULT_LOCK_MODE, LOCK, LOCK_NOWAIT, LOCK_RESULT_PROPERTY, NO_LOCK
BATCH_FETCH_PROPERTY, CascadeAggregateDelete, CascadeAllParts, CascadeByMapping, CascadeDependentParts, CascadePrivateParts, NoCascading
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, java.lang.String sqlResultSetMappingName)
PUBLIC: Initialize the query to use the specified call and SQLResultSetMapping
|
Modifier and Type | Method and Description |
---|---|
void |
addSQLResultSetMapping(SQLResultSetMapping resultSetMapping)
PUBLIC: This will be the SQLResultSetMapping that is used by this query to process the database results
|
void |
addSQLResultSetMappingName(java.lang.String name)
PUBLIC: Add a SQLResultSetMapping that is used by this query to process the database results.
|
void |
cacheResult(java.lang.Object unwrappedOriginal)
INTERNAL: This method is called by the object builder when building an original.
|
void |
convertClassNamesToClasses(java.lang.ClassLoader classLoader)
INTERNAL: Convert all the class-name-based settings in this ResultSetMapping to actual class-based settings.
|
java.lang.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
|
java.lang.String |
getSQLResultSetMappingName()
PUBLIC: Return the result set mapping name.
|
java.util.List<java.lang.String> |
getSQLResultSetMappingNames()
PUBLIC: Return the result set mapping name.
|
java.util.List<SQLResultSetMapping> |
getSQLResultSetMappings()
PUBLIC: This will be the SQLResultSetMapping that is used by this query to process the database results
|
void |
setSQLResultSetMapping(SQLResultSetMapping resultSetMapping)
PUBLIC: This will be the SQLResultSetMapping that is used by this query to process the database results
|
void |
setSQLResultSetMappingName(java.lang.String name)
PUBLIC: This will be the SQLResultSetMapping that is used by this query to process the database results
|
void |
setSQLResultSetMappingNames(java.util.List<java.lang.String> names)
PUBLIC: This will be the SQLResult
|
void |
setSQLResultSetMappings(java.util.List<SQLResultSetMapping> resultSetMappings)
PUBLIC: This will be the SQLResultSetMappings that are used by this query to process the database results
|
clone, copyFromQuery, deepClone, dontRefreshIdentityMapResult, dontRefreshRemoteIdentityMapResult, getDataResults, getEntityFetchGroup, getExecutionFetchGroup, getExecutionTime, getLockMode, getPrefetchedCacheKeys, getReferenceClass, getReferenceClassName, hasExecutionFetchGroup, hasPartialAttributeExpressions, isAttributeJoined, isCacheCheckComplete, isClonePessimisticLocked, isDefaultLock, isLockQuery, isObjectBuildingQuery, isRegisteringResults, postRegisterIndividualResult, prepareFromQuery, recordCloneForPessimisticLocking, refreshIdentityMapResult, refreshRemoteIdentityMapResult, registerIndividualResult, requiresDeferredLocks, setExecutionTime, setLockMode, setPrefetchedCacheKeys, setReferenceClass, setReferenceClassName, setRequiresDeferredLocks, setShouldBuildNullForNullPk, setShouldRefreshIdentityMapResult, setShouldRefreshRemoteIdentityMapResult, setShouldRegisterResultsInUnitOfWork, setShouldUseExclusiveConnection, shouldBuildNullForNullPk, shouldReadAllMappings, shouldReadMapping, shouldRefreshIdentityMapResult, shouldRefreshRemoteIdentityMapResult, shouldRegisterResultsInUnitOfWork, shouldUseExclusiveConnection
buildObject, cacheQueryResults, clearQueryResults, doNotCacheQueryResults, getFetchSize, getFirstResult, getMaxRows, getQueryId, getQueryResultsCachePolicy, getTemporaryCachedQueryResults, isDefaultPropertiesQuery, isReadQuery, prepareForExecution, remoteExecute, setFetchSize, setFirstResult, setMaxRows, setQueryId, setQueryResultsCachePolicy, setTemporaryCachedQueryResults, shouldCacheQueryResults
addArgument, addArgument, addArgument, addArgument, addArgumentByTypeName, addArgumentValue, addArgumentValues, addCall, addStatement, bindAllParameters, buildArgumentFields, cacheStatement, cascadeAllParts, cascadeByMapping, cascadeOnlyDependentParts, cascadePrivateParts, checkDescriptor, checkEarlyReturn, checkPrepare, checkPrepare, dontBindAllParameters, dontCacheStatement, dontCascadeParts, dontMaintainCache, execute, executeInUnitOfWork, extractRemoteResult, getAccessor, getAccessors, getArguments, getArgumentTypeNames, getArgumentTypes, getArgumentValues, getBatchObjects, getCall, getCascadePolicy, getDatasourceCall, getDatasourceCalls, getDescriptor, getDomainClassNounName, getDoNotRedirect, getEJBQLString, getExecutionSession, getFlushOnExecute, getHintString, getJPQLString, getMonitorName, getName, getNullableArguments, getParameterDelimiter, getParameterDelimiterChar, getPartitioningPolicy, getProperties, getProperty, getQueryMechanism, getQueryNounName, getQueryTimeout, getRedirector, getRedirectorForQuery, getSelectionCriteria, getSensorName, getSession, getSessionName, getShouldBindAllParameters, getSourceMapping, getSQLStatement, getSQLString, getSQLStrings, getTranslatedSQLString, getTranslatedSQLStrings, getTranslationRow, hasAccessor, hasArguments, hasNullableArguments, hasProperties, hasQueryMechanism, hasSessionName, ignoreBindAllParameters, ignoreCacheStatement, isCallQuery, isCascadeOfAggregateDelete, isCustomQueryUsed, isDataModifyQuery, isDataReadQuery, isDeleteAllQuery, isDeleteObjectQuery, isDirectReadQuery, isExecutionClone, isExpressionQuery, isInsertObjectQuery, isJPQLCallQuery, isModifyAllQuery, isModifyQuery, isNativeConnectionRequired, isObjectLevelModifyQuery, isObjectLevelReadQuery, isPrepared, isReadAllQuery, isReadObjectQuery, isReportQuery, isSQLCallQuery, isUpdateAllQuery, isUpdateObjectQuery, isUserDefined, isUserDefinedSQLCall, isValueReadQuery, isWriteObjectQuery, maintainCache, prepareCall, redirectQuery, removeProperty, replaceValueHoldersIn, resetMonitorName, retrieveBypassCache, rowFromArguments, setAccessor, setAccessors, setAllowNativeSQLQuery, setArguments, setArgumentTypeNames, setArgumentTypes, setArgumentValues, setBatchObjects, setCall, setCascadePolicy, setDatasourceCall, setDescriptor, setDoNotRedirect, setEJBQLString, setFlushOnExecute, setHintString, setIsExecutionClone, setIsNativeConnectionRequired, setIsPrepared, setIsUserDefined, setIsUserDefinedSQLCall, setJPQLString, setName, setNullableArguments, setParameterDelimiter, setPartitioningPolicy, setProperties, setProperty, setQueryTimeout, setRedirector, setSelectionCriteria, setSession, setSessionName, setShouldBindAllParameters, setShouldBindAllParameters, setShouldCacheStatement, setShouldMaintainCache, setShouldPrepare, setShouldRetrieveBypassCache, setShouldStoreBypassCache, setShouldUseWrapperPolicy, setShouldValidateUpdateCallCacheUse, setSourceMapping, setSQLStatement, setSQLString, setTranslationRow, shouldAllowNativeSQLQuery, shouldBindAllParameters, shouldCacheStatement, shouldCascadeAllParts, shouldCascadeByMapping, shouldCascadeOnlyDependentParts, shouldCascadeParts, shouldCascadePrivateParts, shouldCloneCall, shouldIgnoreBindAllParameters, shouldIgnoreCacheStatement, shouldMaintainCache, shouldPrepare, shouldPrepare, shouldRetrieveBypassCache, shouldStoreBypassCache, shouldUseWrapperPolicy, shouldValidateUpdateCallCacheUse, storeBypassCache, toString
public ResultSetMappingQuery()
public ResultSetMappingQuery(Call call)
public ResultSetMappingQuery(Call call, java.lang.String sqlResultSetMappingName)
public void addSQLResultSetMapping(SQLResultSetMapping resultSetMapping)
public void addSQLResultSetMappingName(java.lang.String name)
public void cacheResult(java.lang.Object unwrappedOriginal)
This method is called by the object builder when building an original. It will cause the original to be cached in the query results if the query is set to do so.
cacheResult
in class ReadQuery
public void convertClassNamesToClasses(java.lang.ClassLoader classLoader)
convertClassNamesToClasses
in class ObjectBuildingQuery
public void setSQLResultSetMapping(SQLResultSetMapping resultSetMapping)
public void setSQLResultSetMappings(java.util.List<SQLResultSetMapping> resultSetMappings)
public void setSQLResultSetMappingName(java.lang.String name)
public void setSQLResultSetMappingNames(java.util.List<java.lang.String> names)
names
-public java.lang.Object executeDatabaseQuery() throws DatabaseException
executeDatabaseQuery
in class DatabaseQuery
DatabaseException
- - an error has occurred on the database.public SQLResultSetMapping getSQLResultSetMapping()
public java.util.List<SQLResultSetMapping> getSQLResultSetMappings()
public java.lang.String getSQLResultSetMappingName()
public java.util.List<java.lang.String> getSQLResultSetMappingNames()