Package org.eclipse.persistence.queries
Class UpdateObjectQuery
java.lang.Object
org.eclipse.persistence.queries.DatabaseQuery
org.eclipse.persistence.queries.ModifyQuery
org.eclipse.persistence.queries.ObjectLevelModifyQuery
org.eclipse.persistence.queries.WriteObjectQuery
org.eclipse.persistence.queries.UpdateObjectQuery
- All Implemented Interfaces:
Serializable,Cloneable
Purpose: Used for updating existing objects into the database. This class does not have much behavior. It inherits most of it's behavior from WriteObjectQuery
- See Also:
- Author:
- Yvon Lavoie
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.persistence.queries.DatabaseQuery
DatabaseQuery.ParameterType -
Field Summary
Fields inherited from class org.eclipse.persistence.queries.ObjectLevelModifyQuery
backupClone, object, objectChangeSet, primaryKeyFields inherited from class org.eclipse.persistence.queries.ModifyQuery
forceBatchStatementExecution, isBatchExecutionSupported, modifyRowFields inherited from class org.eclipse.persistence.queries.DatabaseQuery
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, queryTimeoutUnit, redirector, session, sessionName, shouldBindAllParameters, shouldCacheStatement, shouldCloneCall, shouldMaintainCache, shouldPrepare, shouldRetrieveBypassCache, shouldReturnGeneratedKeys, shouldStoreBypassCache, shouldUseWrapperPolicy, shouldValidateUpdateCallCacheUse, sourceMapping, translationRow -
Constructor Summary
ConstructorsConstructorDescriptionPUBLIC: Default constructor.UpdateObjectQuery(Object objectToUpdate) PUBLIC: Create an update query with the object being updated.UpdateObjectQuery(Call call) PUBLIC: Create an update query with the custom call. -
Method Summary
Modifier and TypeMethodDescriptionprotected DatabaseQuerycheckForCustomQuery(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.voidINTERNAL: Perform an update.voidINTERNAL: Perform an update.protected QueryRedirectorINTERNAL: Returns the specific default redirector for this query type.booleanPUBLIC: Return if this is an update object query.protected voidprepare()INTERNAL: Prepare the receiver for execution in a session.protected voidprepareCustomQuery(DatabaseQuery customQuery) INTERNAL: Set the properties needed to be cascaded into the custom query.Methods inherited from class org.eclipse.persistence.queries.WriteObjectQuery
executeDatabaseQuery, isWriteObjectQuery, prepareForExecutionMethods inherited from class org.eclipse.persistence.queries.ObjectLevelModifyQuery
checkDescriptor, executeInUnitOfWork, executeInUnitOfWorkObjectLevelModifyQuery, getBackupClone, getObject, getObjectChangeSet, getPrimaryKey, getReferenceClass, getReferenceClassName, isObjectLevelModifyQuery, resetMonitorName, setBackupClone, setObject, setObjectChangeSet, setPrimaryKey, toStringMethods inherited from class org.eclipse.persistence.queries.ModifyQuery
forceBatchStatementExecution, getModifyRow, isBatchExecutionSupported, isModifyQuery, setForceBatchStatementExecution, setIsBatchExecutionSupported, setModifyRowMethods inherited from class org.eclipse.persistence.queries.DatabaseQuery
addArgument, addArgument, addArgument, addArgument, addArgument, addArgument, addArgumentByTypeName, addArgumentValue, addArgumentValues, addCall, addStatement, bindAllParameters, buildArgumentFields, buildSelectionCriteria, cacheStatement, cascadeAllParts, cascadeByMapping, cascadeOnlyDependentParts, cascadePrivateParts, checkEarlyReturn, checkPrepare, checkPrepare, clone, clonedQueryExecutionComplete, convertClassNamesToClasses, copyFromQuery, dontBindAllParameters, dontCacheStatement, dontCascadeParts, dontMaintainCache, execute, extractRemoteResult, getAccessor, getAccessors, getArgumentParameterTypes, getArguments, getArgumentTypeNames, getArgumentTypes, getArgumentValues, getBatchObjects, getCall, getCascadePolicy, getDatasourceCall, getDatasourceCalls, 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, isUserDefined, isUserDefinedSQLCall, isValueReadQuery, maintainCache, prepareCall, 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
-
Constructor Details
-
UpdateObjectQuery
public UpdateObjectQuery()PUBLIC: Default constructor. -
UpdateObjectQuery
PUBLIC: Create an update query with the object being updated. -
UpdateObjectQuery
PUBLIC: Create an update query with the custom call.
-
-
Method Details
-
executeCommit
INTERNAL: Perform an update.- Overrides:
executeCommitin classWriteObjectQuery- Throws:
DatabaseExceptionOptimisticLockException
-
executeCommitWithChangeSet
INTERNAL: Perform an update.- Overrides:
executeCommitWithChangeSetin classWriteObjectQuery- Throws:
DatabaseExceptionOptimisticLockException
-
prepare
protected void prepare()INTERNAL: Prepare the receiver for execution in a session.- Overrides:
preparein classObjectLevelModifyQuery
-
checkForCustomQuery
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. This is done before the query is copied and prepared/executed. null means there is none.- Overrides:
checkForCustomQueryin classDatabaseQuery
-
prepareCustomQuery
INTERNAL: Set the properties needed to be cascaded into the custom query.- Overrides:
prepareCustomQueryin classDatabaseQuery
-
getDefaultRedirector
INTERNAL: Returns the specific default redirector for this query type. There are numerous default query redirectors. See ClassDescriptor for their types.- Overrides:
getDefaultRedirectorin classWriteObjectQuery
-
isUpdateObjectQuery
public boolean isUpdateObjectQuery()PUBLIC: Return if this is an update object query.- Overrides:
isUpdateObjectQueryin classDatabaseQuery
-