public class ReadObjectQuery extends ObjectLevelReadQuery
Purpose: Concrete class for all read queries involving a single object.
Responsibilities: Return a single object for the query. Implements the inheritance feature when dealing with abstract descriptors.
DatabaseQuery.ParameterType
Modifier and Type | Field and Description |
---|---|
protected java.lang.Object |
selectionId
Key that can be used in place of a selection criteria.
|
protected java.lang.Object |
selectionObject
Object that can be used in place of a selection criteria.
|
protected boolean |
shouldLoadResultIntoSelectionObject
Can be used to refresh a specific non-cached instance from the database.
|
additionalFields, batchFetchPolicy, cacheUsage, CheckCacheByExactPrimaryKey, CheckCacheByPrimaryKey, CheckCacheOnly, CheckCacheThenDatabase, concreteSubclassCalls, concreteSubclassJoinedMappingIndexes, ConformResultsInUnitOfWork, defaultBuilder, distinctState, DoNotCheckCache, DONT_USE_DISTINCT, fetchGroup, fetchGroupName, inMemoryQueryIndirectionPolicy, isCachedExpressionQuery, isPrePrepared, isReadOnly, isReferenceClassLocked, isResultSetAccessOptimizedQuery, isResultSetAccessOptimizedQueryDefault, isResultSetOptimizedQuery, joinedAttributeManager, loadGroup, lockModeType, NONE, nonFetchJoinAttributeExpressions, OPTIMISTIC, OPTIMISTIC_FORCE_INCREMENT, orderByExpressions, partialAttributeExpressions, PESSIMISTIC_, PESSIMISTIC_FORCE_INCREMENT, PESSIMISTIC_READ, PESSIMISTIC_WRITE, READ, shouldExtendPessimisticLockScope, shouldIncludeData, shouldOuterJoinSubclasses, shouldUseDefaultFetchGroup, shouldUseSerializedObjectPolicy, shouldUseSerializedObjectPolicyDefault, UNCOMPUTED_DISTINCT, unionExpressions, USE_DISTINCT, UseDescriptorSetting, usesResultSetAccessOptimization, waitTimeout, WRITE
DEFAULT_LOCK_MODE, executionTime, isCacheCheckComplete, LOCK, LOCK_NOWAIT, LOCK_RESULT_PROPERTY, lockingClause, NO_LOCK, prefetchedCacheKeys, referenceClass, referenceClassName, requiresDeferredLocks, shouldBuildNullForNullPk, shouldRefreshIdentityMapResult, shouldRefreshRemoteIdentityMapResult, shouldRegisterResultsInUnitOfWork, shouldUseExclusiveConnection, wasDefaultLockMode
fetchSize, firstResult, maxResults, maxRows, queryId, queryResultCachingPolicy, temporaryCachedQueryResults
accessors, allowNativeSQLQuery, argumentFields, argumentParameterTypes, arguments, argumentTypeNames, argumentTypes, argumentValues, BATCH_FETCH_PROPERTY, CascadeAggregateDelete, CascadeAllParts, CascadeByMapping, CascadeDependentParts, cascadePolicy, CascadePrivateParts, descriptor, descriptors, doNotRedirect, executionSession, flushOnExecute, hintString, isCustomQueryUsed, isExecutionClone, isNativeConnectionRequired, isPrepared, isUserDefined, isUserDefinedSQLCall, monitorName, name, NoCascading, nullableArguments, parameterDelimiter, partitioningPolicy, properties, queryMechanism, queryTimeout, redirector, session, sessionName, shouldBindAllParameters, shouldCacheStatement, shouldCloneCall, shouldMaintainCache, shouldPrepare, shouldRetrieveBypassCache, shouldStoreBypassCache, shouldUseWrapperPolicy, shouldValidateUpdateCallCacheUse, sourceMapping, translationRow
Constructor and Description |
---|
ReadObjectQuery()
PUBLIC:
Return a new read object query.
|
ReadObjectQuery(Call call)
PUBLIC:
Return a new read object query.
|
ReadObjectQuery(java.lang.Class classToRead)
PUBLIC:
Return a new read object query.
|
ReadObjectQuery(java.lang.Class classToRead,
Call call)
PUBLIC:
Return a new read object query.
|
ReadObjectQuery(java.lang.Class classToRead,
Expression selectionCriteria)
PUBLIC:
Return a new read object query for the class and the selection criteria.
|
ReadObjectQuery(java.lang.Class classToRead,
ExpressionBuilder builder)
PUBLIC:
Return a new read object query for the class.
|
ReadObjectQuery(ExpressionBuilder builder)
PUBLIC:
The expression builder should be provide on creation to ensure only one is used.
|
ReadObjectQuery(java.lang.Object objectToRead)
PUBLIC:
Return a query to read the object with the same primary key as the provided object.
|
ReadObjectQuery(java.lang.Object exampleObject,
QueryByExamplePolicy policy)
PUBLIC:
Return a query by example query to find an object matching the attributes of the example object.
|
Modifier and Type | Method and Description |
---|---|
void |
cacheResult(java.lang.Object object)
INTERNAL:
This method is called by the object builder when building an original.
|
void |
checkCacheByExactPrimaryKey()
PUBLIC:
The cache will be checked only if the query contains exactly the primary key.
|
void |
checkCacheByPrimaryKey()
PUBLIC:
This is the default, the cache will be checked only if the query contains the primary key.
|
void |
checkCacheThenDatabase()
PUBLIC:
The cache will be checked completely, then if the object is not found or the query too complex the database will be queried.
|
void |
checkDescriptor(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Ensure that the descriptor has been set.
|
protected java.lang.Object |
checkEarlyReturnLocal(org.eclipse.persistence.internal.sessions.AbstractSession session,
org.eclipse.persistence.internal.sessions.AbstractRecord translationRow)
INTERNAL:
The cache check is done before the prepare as a hit will not require the work to be done.
|
protected DatabaseQuery |
checkForCustomQuery(org.eclipse.persistence.internal.sessions.AbstractSession session,
org.eclipse.persistence.internal.sessions.AbstractRecord translationRow)
INTERNAL:
Check to see if a custom query should be used for this query.
|
protected java.lang.Object |
conformResult(java.lang.Object result,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow,
boolean buildDirectlyFromRows)
INTERNAL:
Conform the result in the UnitOfWork.
|
void |
copyFromQuery(DatabaseQuery query)
INTERNAL:
Copy all setting from the query.
|
void |
dontLoadResultIntoSelectionObject()
PUBLIC:
Do not refesh/load into the selection object, this is the default.
|
java.lang.Object |
execute(org.eclipse.persistence.internal.sessions.AbstractSession session,
org.eclipse.persistence.internal.sessions.AbstractRecord row)
INTERNAL:
Execute the query.
|
protected java.lang.Object |
executeObjectLevelReadQuery()
INTERNAL:
Execute the query.
|
protected java.lang.Object |
executeObjectLevelReadQueryFromResultSet()
INTERNAL:
Execute the query building the objects directly from the database result-set.
|
java.lang.Object |
extractRemoteResult(org.eclipse.persistence.internal.sessions.remote.Transporter transporter)
INTERNAL:
Extract the correct query result from the transporter.
|
protected QueryRedirector |
getDefaultRedirector()
INTERNAL:
Returns the specific default redirector for this query type.
|
protected java.lang.Object |
getQueryPrimaryKey()
INTERNAL:
Return the primary key stored in this query
|
java.lang.Object |
getSelectionId()
PUBLIC:
Return Id of the object to be selected by the query.
|
java.util.Vector |
getSelectionKey()
Deprecated.
|
java.lang.Object |
getSelectionObject()
PUBLIC:
Return the selection object of the query.
|
protected boolean |
hasNonDefaultFetchGroup()
INTERNAL:
Return if the query has an non-default fetch group defined for itself.
|
boolean |
isPrimaryKeyQuery()
INTERNAL:
Return if the query is by primary key.
|
boolean |
isReadObjectQuery()
PUBLIC:
Return if this is a read object query.
|
void |
loadResultIntoSelectionObject()
PUBLIC:
Allow for the selection object of the query to be refreshed or put into the EclipseLink cache.
|
protected void |
prepare()
INTERNAL:
Prepare the receiver for execution in a session.
|
protected void |
prepareCustomQuery(DatabaseQuery customQuery)
INTERNAL:
Set the properties needed to be cascaded into the custom query including the translation row.
|
void |
prepareForExecution()
INTERNAL:
Prepare the receiver for execution in a session.
|
protected void |
prePrepare()
INTERNAL:
Prepare the receiver for execution in a session.
|
java.lang.Object |
registerResultInUnitOfWork(java.lang.Object result,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
org.eclipse.persistence.internal.sessions.AbstractRecord arguments,
boolean buildDirectlyFromRows)
INTERNAL:
All objects queried via a UnitOfWork get registered here.
|
protected java.lang.Object |
remoteExecute() |
java.util.Map |
replaceValueHoldersIn(java.lang.Object object,
org.eclipse.persistence.internal.sessions.remote.RemoteSessionController controller)
INTERNAL:
replace the value holders in the specified result object(s)
|
void |
setSelectionId(java.lang.Object id)
PUBLIC:
The Id of the object to be selected by the query.
|
void |
setSelectionKey(java.util.List selectionKey)
Deprecated.
|
void |
setSelectionObject(java.lang.Object selectionObject)
PUBLIC:
Used to set the where clause of the query.
|
void |
setShouldLoadResultIntoSelectionObject(boolean shouldLoadResultIntoSelectionObject)
PUBLIC:
Allow for the selection object of the query to be refreshed or put into the EclipseLink cache.
|
void |
setSingletonSelectionKey(java.lang.Object selectionKey)
Deprecated.
|
boolean |
shouldCheckCacheByExactPrimaryKey()
PUBLIC:
Return if cache should be checked.
|
boolean |
shouldCheckCacheByPrimaryKey()
PUBLIC:
Return if cache should be checked.
|
boolean |
shouldCheckCacheThenDatabase()
PUBLIC:
Return if cache should be checked.
|
boolean |
shouldLoadResultIntoSelectionObject()
PUBLIC:
return true if the result should be loaded into the passed in selection Object
|
acquireLocks, acquireLocksWithoutWaiting, addAdditionalField, addAdditionalField, addBatchReadAttribute, addBatchReadAttribute, addDescendingOrdering, addJoinedAttribute, addJoinedAttribute, addJoinSelectionFields, addNonFetchJoin, addNonFetchJoinedAttribute, addNonFetchJoinedAttribute, addOrdering, addPartialAttribute, addPartialAttribute, addSelectionFieldsForJoinedExpression, addUnionExpression, buildObject, changeDescriptor, checkCacheOnly, checkEarlyReturn, checkPrepare, checkPrePrepare, clearIsResultSetOptimizedQuery, clearUsesResultSetAccessOptimization, clone, computeBatchReadMappingQueries, computeNestedQueriesForBatchReadExpressions, conformIndividualResult, conformResultsInUnitOfWork, deepClone, dontAcquireLocks, dontCheckCache, dontRefreshIdentityMapResult, dontRefreshRemoteIdentityMapResult, dontUseDistinct, equals, except, executeDatabaseQuery, executeInUnitOfWork, extendPessimisticLockScope, getAdditionalFields, getAsOfClause, getBatchFetchPolicy, getBatchObjects, getBatchReadAttributeExpressions, getCacheUsage, getConcreteSubclassCalls, getConcreteSubclassJoinedMappingIndexes, getDistinctState, getExampleObject, getExecutionFetchGroup, getExecutionFetchGroup, getExpressionBuilder, getFetchGroup, getFetchGroupName, getFetchGroupNonNestedFieldsSet, getFetchGroupNonNestedFieldsSet, getFetchGroupSelectionFields, getFetchGroupSelectionFields, getInMemoryQueryIndirectionPolicy, getInMemoryQueryIndirectionPolicyState, getJoinedAttributeExpressions, getJoinedAttributeManager, getLoadGroup, getLockingClause, getLockModeType, getNonFetchJoinAttributeExpressions, getOrderByExpressions, getPartialAttributeExpressions, getPartialAttributeSelectionFields, getQueryByExamplePolicy, getReferenceClass, getReferenceClassName, getSelectionFields, getUnionExpressions, getWaitTimeout, hasAdditionalFields, hasAsOfClause, hasBatchReadAttributes, hasDefaultBuilder, hasExecutionFetchGroup, hasFetchGroup, hashCode, hasJoining, hasNonFetchJoinedAttributeExpressions, hasOrderByExpressions, hasPartialAttributeExpressions, hasUnionExpressions, initializeDefaultBuilder, intersect, isAttributeBatchRead, isCachedExpressionQuery, isClonePessimisticLocked, isDefaultLock, isDefaultPropertiesQuery, isDistinctComputed, isLockQuery, isLockQuery, isObjectLevelReadQuery, isPartialAttribute, isPrePrepared, isReadOnly, isReferenceClassLocked, isResultSetAccessOptimizedQuery, isResultSetOptimizedQuery, prepareFetchGroup, prepareForRemoteExecution, prepareFromCachedQuery, prepareFromQuery, prepareOutsideUnitOfWork, prepareQuery, prepareResultSetAccessOptimization, recordCloneForPessimisticLocking, refreshIdentityMapResult, refreshRemoteIdentityMapResult, resetDistinct, setAdditionalFields, setAsOfClause, setBatchFetchPolicy, setBatchFetchSize, setBatchFetchType, setBatchObjects, setBatchReadAttributeExpressions, setCacheUsage, setDescriptor, setDistinctState, setEJBQLString, setExampleObject, setExpressionBuilder, setFetchGroup, setFetchGroupName, setInMemoryQueryIndirectionPolicy, setInMemoryQueryIndirectionPolicyState, setIsPrepared, setIsPreparedKeepingSubclassData, setIsPrePrepared, setIsReadOnly, setIsResultSetAccessOptimizedQuery, setIsResultSetOptimizedQuery, setJoinedAttributeExpressions, setJoinedAttributeManager, setLoadGroup, setLockingClause, setLockMode, setLockModeType, setNonFetchJoinAttributeExpressions, setOrderByExpressions, setPartialAttributeExpressions, setQueryByExamplePolicy, setReferenceClass, setReferenceClassName, setSelectionCriteria, setShouldExtendPessimisticLockScope, setShouldFilterDuplicates, setShouldIncludeData, setShouldOuterJoinSubclasses, setShouldUseDefaultFetchGroup, setShouldUseSerializedObjectPolicy, setUnionExpressions, setWaitTimeout, shouldCheckCache, shouldCheckCacheOnly, shouldCheckDescriptorForCacheUsage, shouldConformResultsInUnitOfWork, shouldDistinctBeUsed, shouldExtendPessimisticLockScope, shouldFilterDuplicates, shouldIncludeData, shouldOuterJoinSubclasses, shouldReadAllMappings, shouldReadMapping, shouldUseDefaultFetchGroup, shouldUseSerializedObjectPolicy, supportsResultSetAccessOptimizationOnExecute, supportsResultSetAccessOptimizationOnPrepare, toString, union, useDistinct, usesResultSetAccessOptimization
clonedQueryExecutionComplete, convertClassNamesToClasses, getDataResults, getExecutionTime, getLockMode, getPrefetchedCacheKeys, isAttributeJoined, isCacheCheckComplete, isObjectBuildingQuery, isRegisteringResults, postRegisterIndividualResult, registerIndividualResult, requiresDeferredLocks, setExecutionTime, setPrefetchedCacheKeys, setRequiresDeferredLocks, setShouldBuildNullForNullPk, setShouldRefreshIdentityMapResult, setShouldRefreshRemoteIdentityMapResult, setShouldRegisterResultsInUnitOfWork, setShouldUseExclusiveConnection, setWasDefaultLockMode, shouldBuildNullForNullPk, shouldRefreshIdentityMapResult, shouldRefreshRemoteIdentityMapResult, shouldRegisterResultsInUnitOfWork, shouldUseExclusiveConnection, wasDefaultLockMode
cacheQueryResults, clearQueryResults, doNotCacheQueryResults, getFetchSize, getFirstResult, getInternalMax, getMaxRows, getQueryId, getQueryResults, getQueryResults, getQueryResults, getQueryResultsCachePolicy, getTemporaryCachedQueryResults, isReadQuery, remoteExecute, setFetchSize, setFirstResult, setInternalMax, setMaxRows, setQueryId, setQueryResults, setQueryResultsCachePolicy, setTemporaryCachedQueryResults, shouldCacheQueryResults
addArgument, addArgument, addArgument, addArgument, addArgument, addArgument, addArgumentByTypeName, addArgumentValue, addArgumentValues, addCall, addStatement, bindAllParameters, buildArgumentFields, buildSelectionCriteria, cacheStatement, cascadeAllParts, cascadeByMapping, cascadeOnlyDependentParts, cascadePrivateParts, checkPrepare, dontBindAllParameters, dontCacheStatement, dontCascadeParts, dontMaintainCache, getAccessor, getAccessors, getArgumentParameterTypes, getArguments, getArgumentTypeNames, getArgumentTypes, getArgumentValues, getCall, getCascadePolicy, getDatasourceCall, getDatasourceCalls, getDescriptor, getDescriptors, 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, isCustomSelectionQuery, isDataModifyQuery, isDataReadQuery, isDeleteAllQuery, isDeleteObjectQuery, isDirectReadQuery, isExecutionClone, isExpressionQuery, isInsertObjectQuery, isJPQLCallQuery, isModifyAllQuery, isModifyQuery, isNativeConnectionRequired, isObjectLevelModifyQuery, isPrepared, isReadAllQuery, isReportQuery, isResultSetMappingQuery, isSQLCallQuery, isUpdateAllQuery, isUpdateObjectQuery, isUserDefined, isUserDefinedSQLCall, isValueReadQuery, isWriteObjectQuery, maintainCache, prepareCall, prepareInternal, redirectQuery, removeProperty, resetMonitorName, retrieveBypassCache, rowFromArguments, setAccessor, setAccessors, setAllowNativeSQLQuery, setArguments, setArgumentTypeNames, setArgumentTypes, setArgumentValues, setCall, setCascadePolicy, setDatasourceCall, setDoNotRedirect, setExecutionSession, setFlushOnExecute, setHintString, setIsCustomQueryUsed, setIsExecutionClone, setIsNativeConnectionRequired, setIsUserDefined, setIsUserDefinedSQLCall, setJPQLString, setName, setNullableArguments, setParameterDelimiter, setPartitioningPolicy, setProperties, setProperty, setQueryMechanism, setQueryTimeout, setRedirector, 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
protected transient java.lang.Object selectionObject
protected java.lang.Object selectionId
protected boolean shouldLoadResultIntoSelectionObject
public ReadObjectQuery()
public ReadObjectQuery(java.lang.Class classToRead)
ReadObjectQuery(Class, Call)
, ReadObjectQuery(Class, Expression)
, ReadObjectQuery(Class, ExpressionBuilder)
, ReadObjectQuery(ExpressionBuilder)
, ReadObjectQuery(Object)
, or ReadObjectQuery(Object, QueryByExamplePolicy)
.public ReadObjectQuery(java.lang.Class classToRead, Expression selectionCriteria)
public ReadObjectQuery(java.lang.Class classToRead, ExpressionBuilder builder)
public ReadObjectQuery(java.lang.Class classToRead, Call call)
public ReadObjectQuery(Call call)
public ReadObjectQuery(java.lang.Object objectToRead)
public ReadObjectQuery(java.lang.Object exampleObject, QueryByExamplePolicy policy)
public ReadObjectQuery(ExpressionBuilder builder)
public void cacheResult(java.lang.Object object)
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 checkCacheByExactPrimaryKey()
public void checkCacheByPrimaryKey()
public void checkCacheThenDatabase()
public void checkDescriptor(org.eclipse.persistence.internal.sessions.AbstractSession session) throws QueryException
checkDescriptor
in class ObjectLevelReadQuery
QueryException
protected java.lang.Object checkEarlyReturnLocal(org.eclipse.persistence.internal.sessions.AbstractSession session, org.eclipse.persistence.internal.sessions.AbstractRecord translationRow)
checkEarlyReturnLocal
in class ObjectLevelReadQuery
protected DatabaseQuery checkForCustomQuery(org.eclipse.persistence.internal.sessions.AbstractSession session, org.eclipse.persistence.internal.sessions.AbstractRecord translationRow)
checkForCustomQuery
in class DatabaseQuery
protected java.lang.Object conformResult(java.lang.Object result, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork, org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, boolean buildDirectlyFromRows)
public void dontLoadResultIntoSelectionObject()
Note: This forces the selection object into the cache a replaces any existing object that may already be there, this is a strict violation of object identity and other objects can still be refering to the old object.
public java.lang.Object execute(org.eclipse.persistence.internal.sessions.AbstractSession session, org.eclipse.persistence.internal.sessions.AbstractRecord row) throws DatabaseException
execute
in class ObjectLevelReadQuery
session
- the session in which the receiver will be executed.DatabaseException
- - an error has occurred on the databaseprotected java.lang.Object executeObjectLevelReadQuery() throws DatabaseException
executeObjectLevelReadQuery
in class ObjectLevelReadQuery
DatabaseException
- - an error has occurred on the databaseprotected java.lang.Object executeObjectLevelReadQueryFromResultSet() throws DatabaseException
executeObjectLevelReadQueryFromResultSet
in class ObjectLevelReadQuery
DatabaseException
- - an error has occurred on the databasepublic java.lang.Object extractRemoteResult(org.eclipse.persistence.internal.sessions.remote.Transporter transporter)
extractRemoteResult
in class DatabaseQuery
protected QueryRedirector getDefaultRedirector()
getDefaultRedirector
in class DatabaseQuery
@Deprecated public java.util.Vector getSelectionKey()
getSelectionId()
public java.lang.Object getSelectionObject()
public boolean isReadObjectQuery()
isReadObjectQuery
in class DatabaseQuery
public boolean isPrimaryKeyQuery()
isPrimaryKeyQuery
in class ObjectLevelReadQuery
public void loadResultIntoSelectionObject()
Note: This forces the selection object into the cache a replaces any existing object that may already be there, this is a strict violation of object identity and other objects can still be referring to the old object.
public void copyFromQuery(DatabaseQuery query)
copyFromQuery
in class ObjectLevelReadQuery
protected void prepare() throws QueryException
prepare
in class ObjectLevelReadQuery
QueryException
protected void prepareCustomQuery(DatabaseQuery customQuery)
prepareCustomQuery
in class ObjectBuildingQuery
public void prepareForExecution() throws QueryException
prepareForExecution
in class ReadQuery
QueryException
protected void prePrepare() throws QueryException
prePrepare
in class ObjectLevelReadQuery
QueryException
public java.lang.Object registerResultInUnitOfWork(java.lang.Object result, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork, org.eclipse.persistence.internal.sessions.AbstractRecord arguments, boolean buildDirectlyFromRows)
Involves registering the query result individually and in totality, and hence refreshing / conforming is done here.
registerResultInUnitOfWork
in class ObjectLevelReadQuery
result
- may be collection (read all) or an object (read one),
or even a cursor. If in transaction the shared cache will
be bypassed, meaning the result may not be originals from the parent
but raw database rows.unitOfWork
- the unitOfWork the result is being registered in.arguments
- the original arguments/parameters passed to the query
execution. Used by conformingbuildDirectlyFromRows
- If in transaction must construct
a registered result from raw database rows.protected java.lang.Object remoteExecute()
remoteExecute
in class DatabaseQuery
public java.util.Map replaceValueHoldersIn(java.lang.Object object, org.eclipse.persistence.internal.sessions.remote.RemoteSessionController controller)
replaceValueHoldersIn
in class DatabaseQuery
protected java.lang.Object getQueryPrimaryKey()
getQueryPrimaryKey
in class ObjectBuildingQuery
ReadObjectQuery
public java.lang.Object getSelectionId()
public void setSelectionId(java.lang.Object id)
CacheId
@Deprecated public void setSelectionKey(java.util.List selectionKey)
setSelectionId(Object)
public void setSelectionObject(java.lang.Object selectionObject)
public void setShouldLoadResultIntoSelectionObject(boolean shouldLoadResultIntoSelectionObject)
Note: This forces the selection object into the cache a replaces any existing object that may already be there, this is a strict violation of object identity and other objects can still be referring to the old object.
@Deprecated public void setSingletonSelectionKey(java.lang.Object selectionKey)
setSelectionId(Object)
public boolean shouldCheckCacheByExactPrimaryKey()
public boolean shouldCheckCacheByPrimaryKey()
public boolean shouldCheckCacheThenDatabase()
public boolean shouldLoadResultIntoSelectionObject()
protected boolean hasNonDefaultFetchGroup()