public class DeleteObjectQuery extends ObjectLevelModifyQuery
Purpose: Used for deleting objects.
Responsibilities: Extract primary key from object and delete it.
DatabaseQuery.ParameterType
Modifier and Type | Field and Description |
---|---|
protected boolean |
isFullRowRequired
PERF: By default only the translation row is used for deletes, the full row can be requested for custom deletes.
|
protected boolean |
usesOptimisticLocking
Indicates whether the query should use optimistic locking.
|
backupClone, object, objectChangeSet, primaryKey
forceBatchStatementExecution, isBatchExecutionSupported, modifyRow
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 |
---|
DeleteObjectQuery() |
DeleteObjectQuery(Call call) |
DeleteObjectQuery(java.lang.Object objectToDelete) |
Modifier and Type | Method and Description |
---|---|
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.
|
java.lang.Object |
executeDatabaseQuery()
INTERNAL:
Perform the work to delete an object.
|
protected java.lang.Object |
executeInUnitOfWorkObjectLevelModifyQuery(org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
org.eclipse.persistence.internal.sessions.AbstractRecord translationRow)
INTERNAL:
Code was moved from UnitOfWork.internalExecuteQuery
|
protected QueryRedirector |
getDefaultRedirector()
INTERNAL:
Returns the specific default redirector for this query type.
|
boolean |
isDeleteObjectQuery()
PUBLIC:
Return if this is a delete object query.
|
boolean |
isFullRowRequired()
ADVANCED:
Return if the full row is required by the delete query.
|
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.
|
void |
prepareForExecution()
INTERNAL:
Prepare the receiver for execution in a session.
|
void |
setIsFullRowRequired(boolean isFullRowRequired)
ADVANCED:
Set if the full row is required by the delete query.
|
void |
setObject(java.lang.Object object)
PUBLIC: (REQUIRED)
Set the object required for modification.
|
protected boolean |
shouldUseOptimisticLocking(java.lang.Object object)
INTERNAL:
Determines whether the query should use optimistic locking with the passed object.
|
boolean |
usesOptimisticLocking()
INTERNAL:
Indicating whether the query should use optimistic locking.
|
checkDescriptor, executeInUnitOfWork, getBackupClone, getObject, getObjectChangeSet, getPrimaryKey, getReferenceClass, getReferenceClassName, isObjectLevelModifyQuery, resetMonitorName, setBackupClone, setObjectChangeSet, setPrimaryKey, toString
forceBatchStatementExecution, getModifyRow, isBatchExecutionSupported, isModifyQuery, setForceBatchStatementExecution, setIsBatchExecutionSupported, setModifyRow
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, 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, isDirectReadQuery, isExecutionClone, isExpressionQuery, isInsertObjectQuery, isJPQLCallQuery, isModifyAllQuery, isNativeConnectionRequired, isObjectBuildingQuery, isObjectLevelReadQuery, isPrepared, isReadAllQuery, isReadObjectQuery, isReadQuery, isReportQuery, isResultSetMappingQuery, isSQLCallQuery, isUpdateAllQuery, isUpdateObjectQuery, isUserDefined, isUserDefinedSQLCall, isValueReadQuery, isWriteObjectQuery, 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, 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
protected boolean isFullRowRequired
protected boolean usesOptimisticLocking
public DeleteObjectQuery()
public DeleteObjectQuery(java.lang.Object objectToDelete)
public DeleteObjectQuery(Call call)
public boolean isFullRowRequired()
public void setIsFullRowRequired(boolean isFullRowRequired)
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 executeInUnitOfWorkObjectLevelModifyQuery(org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork, org.eclipse.persistence.internal.sessions.AbstractRecord translationRow) throws DatabaseException, OptimisticLockException
executeInUnitOfWorkObjectLevelModifyQuery
in class ObjectLevelModifyQuery
unitOfWork
- translationRow
- DatabaseException
OptimisticLockException
protected QueryRedirector getDefaultRedirector()
getDefaultRedirector
in class DatabaseQuery
public java.lang.Object executeDatabaseQuery() throws DatabaseException, OptimisticLockException
executeDatabaseQuery
in class DatabaseQuery
DatabaseException
- - an error has occurred on the database.OptimisticLockException
- - an error has occurred using the optimistic lock feature.public boolean isDeleteObjectQuery()
isDeleteObjectQuery
in class DatabaseQuery
public void setObject(java.lang.Object object)
setObject
in class ObjectLevelModifyQuery
protected boolean shouldUseOptimisticLocking(java.lang.Object object)
public boolean usesOptimisticLocking()
protected void prepare()
prepare
in class ObjectLevelModifyQuery
protected void prepareCustomQuery(DatabaseQuery customQuery)
prepareCustomQuery
in class DatabaseQuery
public void prepareForExecution() throws QueryException
prepareForExecution
in class ObjectLevelModifyQuery
QueryException