Package org.eclipse.persistence.queries
Class ObjectLevelModifyQuery
java.lang.Object
org.eclipse.persistence.queries.DatabaseQuery
org.eclipse.persistence.queries.ModifyQuery
org.eclipse.persistence.queries.ObjectLevelModifyQuery
- All Implemented Interfaces:
- Serializable,- Cloneable
- Direct Known Subclasses:
- DeleteObjectQuery,- WriteObjectQuery
Purpose: Abstract class for all object modify queries.
Responsibilities:
- Stores & retrieves the object to modify.
- Stores & retrieves the primary key of the objects.
- See Also:
- Author:
- Yvon Lavoie
- 
Nested Class SummaryNested classes/interfaces inherited from class org.eclipse.persistence.queries.DatabaseQueryDatabaseQuery.ParameterType
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected Objectprotected Objectprotected org.eclipse.persistence.internal.sessions.ObjectChangeSetprotected ObjectFields inherited from class org.eclipse.persistence.queries.ModifyQueryforceBatchStatementExecution, isBatchExecutionSupported, modifyRowFields inherited from class org.eclipse.persistence.queries.DatabaseQueryaccessors, 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, queryTimeoutUnit, redirector, session, sessionName, shouldBindAllParameters, shouldCacheStatement, shouldCloneCall, shouldMaintainCache, shouldPrepare, shouldRetrieveBypassCache, shouldReturnGeneratedKeys, shouldStoreBypassCache, shouldUseWrapperPolicy, shouldValidateUpdateCallCacheUse, sourceMapping, translationRow
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidcheckDescriptor(org.eclipse.persistence.internal.sessions.AbstractSession session) INTERNAL: Ensure that the descriptor has been set.executeInUnitOfWork(org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork, org.eclipse.persistence.internal.sessions.AbstractRecord translationRow) INTERNAL: All have done is move code from UnitOfWork.internalExecuteQueryprotected ObjectexecuteInUnitOfWorkObjectLevelModifyQuery(org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork, org.eclipse.persistence.internal.sessions.AbstractRecord translationRow) INTERNAL: This code was moved from UnitOfWork.internalExecuteQuery.INTERNAL: Return the backup clone of the object from the unit of work.PUBLIC: Return the object required for modification.org.eclipse.persistence.internal.sessions.ObjectChangeSetPUBLIC: Return the ObjectChangeSet representing the object being changedINTERNAL: Get the primary key for the queryReturn the domain class associated with this query.INTERNAL: Return the reference class for a query Note: Although the API is designed to avoid classpath dependencies for the MW, since the object is specified at runtime, this will not be an issue.booleanPUBLIC: Return if this is an object level modify query.protected voidprepare()INTERNAL: Prepare the receiver for execution in a session.voidINTERNAL: Prepare the receiver for execution in a session.voidINTERNAL: Return the name to use for the query in performance monitoring.voidsetBackupClone(Object backupClone) INTERNAL: Set the backup clone of the object from the unit of work.voidPUBLIC: (REQUIRED) Set the object required for modification.voidsetObjectChangeSet(org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet) INTERNAL: Set the ObjectChangeSet representing the object to be writtenvoidsetPrimaryKey(Object primaryKey) INTERNAL: Set the primary key for the query.toString()Methods inherited from class org.eclipse.persistence.queries.ModifyQueryforceBatchStatementExecution, getModifyRow, isBatchExecutionSupported, isModifyQuery, setForceBatchStatementExecution, setIsBatchExecutionSupported, setModifyRowMethods inherited from class org.eclipse.persistence.queries.DatabaseQueryaddArgument, addArgument, addArgument, addArgument, addArgument, addArgument, addArgumentByTypeName, addArgumentValue, addArgumentValues, addCall, addStatement, bindAllParameters, buildArgumentFields, buildSelectionCriteria, cacheStatement, cascadeAllParts, cascadeByMapping, cascadeOnlyDependentParts, cascadePrivateParts, checkEarlyReturn, checkForCustomQuery, checkPrepare, checkPrepare, clone, clonedQueryExecutionComplete, convertClassNamesToClasses, copyFromQuery, dontBindAllParameters, dontCacheStatement, dontCascadeParts, dontMaintainCache, execute, executeDatabaseQuery, extractRemoteResult, getAccessor, getAccessors, getArgumentParameterTypes, getArguments, getArgumentTypeNames, getArgumentTypes, getArgumentValues, getBatchObjects, getCall, getCascadePolicy, getDatasourceCall, getDatasourceCalls, getDefaultRedirector, getDescriptor, getDescriptors, getDomainClassNounName, getDoNotRedirect, getEJBQLString, getExecutionSession, getFlushOnExecute, getHintString, getJPQLString, getMonitorName, getName, getNullableArguments, getParameterDelimiter, getParameterDelimiterChar, getPartitioningPolicy, getProperties, getProperty, getQueryMechanism, getQueryNounName, getQueryTimeout, getQueryTimeoutUnit, 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, isDefaultPropertiesQuery, isDeleteAllQuery, isDeleteObjectQuery, isDirectReadQuery, isExecutionClone, isExpressionQuery, isInsertObjectQuery, isJPQLCallQuery, isModifyAllQuery, isNativeConnectionRequired, isObjectBuildingQuery, isObjectLevelReadQuery, isPrepared, isReadAllQuery, isReadObjectQuery, isReadQuery, isReportQuery, isResultSetMappingQuery, isSQLCallQuery, isUpdateAllQuery, isUpdateObjectQuery, isUserDefined, isUserDefinedSQLCall, isValueReadQuery, isWriteObjectQuery, maintainCache, prepareCall, prepareCustomQuery, prepareForRemoteExecution, prepareFromQuery, prepareInternal, redirectQuery, remoteExecute, remoteExecute, removeProperty, replaceValueHoldersIn, retrieveBypassCache, rowFromArguments, setAccessor, setAccessors, setAllowNativeSQLQuery, setArguments, setArgumentTypeNames, setArgumentTypes, setArgumentValues, setBatchObjects, setCall, setCascadePolicy, setDatasourceCall, setDescriptor, setDoNotRedirect, setEJBQLString, setExecutionSession, setFlushOnExecute, setHintString, setIsCustomQueryUsed, setIsExecutionClone, setIsNativeConnectionRequired, setIsPrepared, setIsUserDefined, setIsUserDefinedSQLCall, setJPQLString, setName, setNullableArguments, setParameterDelimiter, setPartitioningPolicy, setProperties, setProperty, setQueryMechanism, setQueryTimeout, setQueryTimeoutUnit, setRedirector, setSelectionCriteria, setSession, setSessionName, setShouldBindAllParameters, setShouldBindAllParameters, setShouldCacheStatement, setShouldMaintainCache, setShouldPrepare, setShouldRetrieveBypassCache, setShouldReturnGeneratedKeys, setShouldStoreBypassCache, setShouldUseWrapperPolicy, setShouldValidateUpdateCallCacheUse, setSourceMapping, setSQLStatement, setSQLString, setTranslationRow, shouldAllowNativeSQLQuery, shouldBindAllParameters, shouldCacheStatement, shouldCascadeAllParts, shouldCascadeByMapping, shouldCascadeOnlyDependentParts, shouldCascadeParts, shouldCascadePrivateParts, shouldCloneCall, shouldIgnoreBindAllParameters, shouldIgnoreCacheStatement, shouldMaintainCache, shouldPrepare, shouldPrepare, shouldRetrieveBypassCache, shouldReturnGeneratedKeys, shouldStoreBypassCache, shouldUseWrapperPolicy, shouldValidateUpdateCallCacheUse, storeBypassCache
- 
Field Details- 
- 
object
- 
objectChangeSetprotected org.eclipse.persistence.internal.sessions.ObjectChangeSet objectChangeSet
- 
backupClone
 
- 
- 
Constructor Details- 
ObjectLevelModifyQuerypublic ObjectLevelModifyQuery()PUBLIC: Initialize the state of the query.
 
- 
- 
Method Details- 
checkDescriptorpublic void checkDescriptor(org.eclipse.persistence.internal.sessions.AbstractSession session) throws QueryException INTERNAL: Ensure that the descriptor has been set.- Overrides:
- checkDescriptorin class- DatabaseQuery
- Throws:
- QueryException
 
- 
executeInUnitOfWorkpublic Object executeInUnitOfWork(org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork, org.eclipse.persistence.internal.sessions.AbstractRecord translationRow) throws DatabaseException INTERNAL: All have done is move code from UnitOfWork.internalExecuteQuery- Overrides:
- executeInUnitOfWorkin class- DatabaseQuery
- Parameters:
- unitOfWork- - the session in which the receiver will be executed.
- translationRow- - the arguments
- Returns:
- An object, the result of executing the query.
- Throws:
- DatabaseException- - an error has occurred on the database.
 
- 
executeInUnitOfWorkObjectLevelModifyQueryprotected Object executeInUnitOfWorkObjectLevelModifyQuery(org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork, org.eclipse.persistence.internal.sessions.AbstractRecord translationRow) throws DatabaseException, OptimisticLockException INTERNAL: This code was moved from UnitOfWork.internalExecuteQuery.
- 
getBackupCloneINTERNAL: Return the backup clone of the object from the unit of work.
- 
getObjectPUBLIC: Return the object required for modification.
- 
getObjectChangeSetpublic org.eclipse.persistence.internal.sessions.ObjectChangeSet getObjectChangeSet()PUBLIC: Return the ObjectChangeSet representing the object being changed
- 
getPrimaryKeyINTERNAL: Get the primary key for the query
- 
getReferenceClassReturn the domain class associated with this query.- Overrides:
- getReferenceClassin class- DatabaseQuery
 
- 
getReferenceClassNameINTERNAL: Return the reference class for a query Note: Although the API is designed to avoid classpath dependencies for the MW, since the object is specified at runtime, this will not be an issue.- Overrides:
- getReferenceClassNamein class- DatabaseQuery
 
- 
resetMonitorNamepublic void resetMonitorName()INTERNAL: Return the name to use for the query in performance monitoring.- Overrides:
- resetMonitorNamein class- DatabaseQuery
 
- 
isObjectLevelModifyQuerypublic boolean isObjectLevelModifyQuery()PUBLIC: Return if this is an object level modify query.- Overrides:
- isObjectLevelModifyQueryin class- DatabaseQuery
 
- 
prepareINTERNAL: Prepare the receiver for execution in a session. In particular check that the tables on the descriptor are set.- Overrides:
- preparein class- DatabaseQuery
- Throws:
- QueryException
 
- 
prepareForExecutionINTERNAL: Prepare the receiver for execution in a session. In particular check that the tables on the descriptor are set.- Overrides:
- prepareForExecutionin class- DatabaseQuery
- Throws:
- QueryException
 
- 
setBackupCloneINTERNAL: Set the backup clone of the object from the unit of work.
- 
setObjectPUBLIC: (REQUIRED) Set the object required for modification.
- 
setObjectChangeSetpublic void setObjectChangeSet(org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet) INTERNAL: Set the ObjectChangeSet representing the object to be written
- 
setPrimaryKeyINTERNAL: Set the primary key for the query.
- 
toString- Overrides:
- toStringin class- DatabaseQuery
 
 
-