org.eclipse.persistence.queries
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,
String sqlResultSetMappingName)
PUBLIC:
Initialize the query to use the specified call and SQLResultSetMapping
|
Modifier and Type | Method and Description |
---|---|
void |
cacheResult(Object unwrappedOriginal)
INTERNAL:
|
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.
|
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
|
copyFromQuery, deepClone, dontRefreshIdentityMapResult, dontRefreshRemoteIdentityMapResult, getDataResults, getEntityFetchGroup, getExecutionFetchGroup, getExecutionTime, getLockMode, getReferenceClass, getReferenceClassName, hasExecutionFetchGroup, hasPartialAttributeExpressions, isAttributeJoined, isClonePessimisticLocked, isDefaultLock, isLockQuery, isObjectBuildingQuery, isRegisteringResults, postRegisterIndividualResult, prepareFromQuery, recordCloneForPessimisticLocking, refreshIdentityMapResult, refreshRemoteIdentityMapResult, registerIndividualResult, requiresDeferredLocks, setExecutionTime, setLockMode, 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, addArgumentByTypeName, addArgumentValue, addArgumentValues, addCall, addStatement, bindAllParameters, buildArgumentFields, cacheStatement, cascadeAllParts, cascadeByMapping, cascadeOnlyDependentParts, cascadePrivateParts, checkDescriptor, checkEarlyReturn, checkPrepare, checkPrepare, dontBindAllParameters, dontCacheStatement, dontCascadeParts, dontMaintainCache, execute, executeInUnitOfWork, extractRemoteResult, getAccessor, getArguments, getArgumentTypeNames, getArgumentTypes, getArgumentValues, getBatchObjects, getCall, getCascadePolicy, getDatasourceCall, getDatasourceCalls, getDescriptor, getDomainClassNounName, getDoNotRedirect, getEJBQLString, getExecutionSession, getFlushOnExecute, getHintString, getJPQLString, getName, getProperties, getProperty, getQueryMechanism, getQueryNounName, getQueryTimeout, getRedirector, getSelectionCriteria, getSensorName, getSession, getSessionName, getShouldBindAllParameters, getSourceMapping, getSQLStatement, getSQLString, getSQLStrings, getTranslatedSQLString, getTranslatedSQLStrings, getTranslationRow, hasAccessor, hasArguments, 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, isValueReadQuery, isWriteObjectQuery, maintainCache, prepareCall, redirectQuery, removeProperty, replaceValueHoldersIn, retrieveBypassCache, rowFromArguments, setAccessor, setArguments, setArgumentTypeNames, setArgumentTypes, setArgumentValues, setBatchObjects, setCall, setCascadePolicy, setDatasourceCall, setDescriptor, setDoNotRedirect, setEJBQLString, setFlushOnExecute, setHintString, setIsExecutionClone, setIsNativeConnectionRequired, setIsPrepared, setIsUserDefined, setJPQLString, setName, setProperties, setProperty, setQueryTimeout, setRedirector, setSelectionCriteria, setSession, setSessionName, setShouldBindAllParameters, setShouldBindAllParameters, setShouldCacheStatement, setShouldMaintainCache, setShouldPrepare, setShouldRetrieveBypassCache, setShouldStoreBypassCache, setShouldUseWrapperPolicy, setSourceMapping, setSQLStatement, setSQLString, setTranslationRow, shouldBindAllParameters, shouldCacheStatement, shouldCascadeAllParts, shouldCascadeByMapping, shouldCascadeOnlyDependentParts, shouldCascadeParts, shouldCascadePrivateParts, shouldCloneCall, shouldIgnoreBindAllParameters, shouldIgnoreCacheStatement, shouldMaintainCache, shouldPrepare, shouldRetrieveBypassCache, shouldStoreBypassCache, shouldUseWrapperPolicy, storeBypassCache, toString
public ResultSetMappingQuery()
public ResultSetMappingQuery(Call call)
public void cacheResult(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 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)
public Object executeDatabaseQuery() throws DatabaseException
executeDatabaseQuery
in class DatabaseQuery
DatabaseException
- - an error has occurred on the database.public SQLResultSetMapping getSQLResultSetMapping()
public String getSQLResultSetMappingName()