public class DeleteAllQuery extends ModifyAllQuery
Purpose: Query used to delete a collection of objects
Responsibilities:
INVALIDATE_CACHE, NO_CACHEBATCH_FETCH_PROPERTY, CascadeAggregateDelete, CascadeAllParts, CascadeByMapping, CascadeDependentParts, CascadePrivateParts, NoCascading| Constructor and Description |
|---|
DeleteAllQuery()
PUBLIC:
|
DeleteAllQuery(Class referenceClass)
PUBLIC:
Create a new delete all query for the class specified.
|
DeleteAllQuery(Class referenceClass,
Expression selectionCriteria)
PUBLIC:
Create a new delete all query for the class and the selection criteria
specified.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
executeDatabaseQuery()
INTERNAL:
Perform the work to delete a collection of objects.
|
void |
executeDeleteAll(org.eclipse.persistence.internal.sessions.AbstractSession session,
org.eclipse.persistence.internal.sessions.AbstractRecord translationRow,
Vector objects)
INTERNAL:
Delete all queries are executed specially to avoid cloning and ensure preparing.
|
Object |
executeInUnitOfWork(org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
org.eclipse.persistence.internal.sessions.AbstractRecord translationRow)
INTERNAL:
This method has to be broken.
|
Vector |
getObjects()
PUBLIC:
Return the objects that are to be deleted
|
boolean |
isDeleteAllQuery()
PUBLIC:
Return if this is a delete all query.
|
void |
setObjects(Vector objectCollection)
PUBLIC (REQUIRED):
Set the objects to be deleted.
|
getCacheUsage, getExpressionBuilder, getReferenceClass, getReferenceClassName, isModifyQuery, isPreparedUsingTempStorage, mergeChangesIntoSharedCache, setCacheUsage, setExpressionBuilder, setIsPreparedUsingTempStorage, setReferenceClass, setReferenceClassName, setShouldDeferExecutionInUOW, shouldDeferExecutionInUOWforceBatchStatementExecution, getModifyRow, setForceBatchStatementExecution, setModifyRowaddArgument, addArgument, addArgument, addArgumentByTypeName, addArgumentValue, addArgumentValues, addCall, addStatement, bindAllParameters, buildArgumentFields, cacheStatement, cascadeAllParts, cascadeByMapping, cascadeOnlyDependentParts, cascadePrivateParts, checkDescriptor, checkEarlyReturn, checkPrepare, checkPrepare, clone, convertClassNamesToClasses, copyFromQuery, dontBindAllParameters, dontCacheStatement, dontCascadeParts, dontMaintainCache, execute, 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, isDefaultPropertiesQuery, isDeleteObjectQuery, isDirectReadQuery, isExecutionClone, isExpressionQuery, isInsertObjectQuery, isJPQLCallQuery, isModifyAllQuery, isNativeConnectionRequired, isObjectBuildingQuery, isObjectLevelModifyQuery, isObjectLevelReadQuery, isPrepared, isReadAllQuery, isReadObjectQuery, isReadQuery, isReportQuery, isSQLCallQuery, isUpdateAllQuery, isUpdateObjectQuery, isUserDefined, isValueReadQuery, isWriteObjectQuery, maintainCache, prepareCall, prepareForExecution, prepareFromQuery, redirectQuery, remoteExecute, 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, toStringpublic DeleteAllQuery()
public DeleteAllQuery(Class referenceClass)
public DeleteAllQuery(Class referenceClass, Expression selectionCriteria)
public boolean isDeleteAllQuery()
isDeleteAllQuery in class DatabaseQuerypublic Object executeInUnitOfWork(org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork, org.eclipse.persistence.internal.sessions.AbstractRecord translationRow) throws DatabaseException, OptimisticLockException
executeInUnitOfWork in class ModifyAllQueryunitOfWork - translationRow - org.eclipse.persistence.essentials.exceptions.DatabaseExceptionorg.eclipse.persistence.essentials.exceptions.OptimisticLockExceptionDatabaseException - - an error has occurred on the database.OptimisticLockException - - an error has occurred using the optimistic lock feature.public Object executeDatabaseQuery() throws DatabaseException
executeDatabaseQuery in class DatabaseQueryDatabaseException - - an error has occurred on the database.public void executeDeleteAll(org.eclipse.persistence.internal.sessions.AbstractSession session,
org.eclipse.persistence.internal.sessions.AbstractRecord translationRow,
Vector objects)
throws DatabaseException
DatabaseExceptionpublic Vector getObjects()
public void setObjects(Vector objectCollection)