public class DeleteAllQuery extends ModifyAllQuery
Purpose: Query used to delete a collection of objects
Responsibilities:
Modifier and Type | Field and Description |
---|---|
protected Vector |
objects |
defaultBuilder, INVALIDATE_CACHE, isPreparedUsingTempStorage, NO_CACHE, referenceClass, referenceClassName, result
forceBatchStatementExecution, modifyRow
accessor, arguments, argumentTypeNames, argumentTypes, argumentValues, CascadeAggregateDelete, CascadeAllParts, CascadeByMapping, CascadeDependentParts, cascadePolicy, CascadePrivateParts, descriptor, flushOnExecute, isPrepared, isUserDefined, name, NoCascading, properties, queryMechanism, session, sessionName, shouldBindAllParameters, shouldCacheStatement, shouldCloneCall, shouldMaintainCache, shouldPrepare, shouldUseWrapperPolicy, translationRow
False, True, Undefined
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(AbstractSession session,
AbstractRecord translationRow,
Vector objects)
INTERNAL:
Delete all queries are executed specially to avoid cloning and ensure preparing.
|
Object |
executeInUnitOfWork(UnitOfWorkImpl unitOfWork,
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.
|
protected void |
prepare()
INTERNAL:
Prepare the receiver for execution in a session.
|
void |
setObjects(Vector objectCollection)
PUBLIC (REQUIRED):
Set the objects to be deleted.
|
clonedQueryExecutionComplete, getCacheUsage, getExpressionBuilder, getReferenceClass, getReferenceClassName, initializeDefaultBuilder, initializeQuerySpecificDefaultBuilder, invalidateCache, isModifyQuery, isPreparedUsingTempStorage, mergeChangesIntoSharedCache, setCacheUsage, setExpressionBuilder, setIsPreparedUsingTempStorage, setReferenceClass, setReferenceClassName, setShouldDeferExecutionInUOW, shouldDeferExecutionInUOW, shouldInvalidateCache
forceBatchStatementExecution, getModifyRow, setForceBatchStatementExecution, setModifyRow
addArgument, addArgument, addArgument, addArgumentByTypeName, addArgumentValue, addArgumentValues, addCall, addStatement, bindAllParameters, buildSelectionCriteria, cacheStatement, cascadeAllParts, cascadeByMapping, cascadeOnlyDependentParts, cascadePrivateParts, checkDescriptor, checkEarlyReturn, checkForCustomQuery, checkPrepare, clone, convertClassNamesToClasses, deploymentSetShouldMaintainCache, deploymentShouldMaintainCache, dontBindAllParameters, dontCacheStatement, dontCascadeParts, dontMaintainCache, execute, getAccessor, getArguments, getArgumentTypeNames, getArgumentTypes, getArgumentValues, getCall, getCascadePolicy, getDatasourceCall, getDatasourceCalls, getDescriptor, getEJBQLString, getFlushOnExecute, getName, getProperties, getProperty, getQueryMechanism, getSelectionCriteria, getSession, getSessionName, getShouldBindAllParameters, getSQLStatement, getSQLString, getSQLStrings, getTranslatedSQLString, getTranslatedSQLStrings, getTranslationRow, hasAccessor, hasProperties, hasQueryMechanism, hasSessionName, ignoreBindAllParameters, ignoreCacheStatement, isCallQuery, isCascadeOfAggregateDelete, isDataModifyQuery, isDataReadQuery, isDeleteObjectQuery, isExpressionQuery, isInsertObjectQuery, isModifyAllQuery, isObjectBuildingQuery, isObjectLevelModifyQuery, isObjectLevelReadQuery, isPrepared, isReadAllQuery, isReadObjectQuery, isReadQuery, isReportQuery, isSQLCallQuery, isUpdateAllQuery, isUpdateObjectQuery, isUserDefined, isWriteObjectQuery, maintainCache, prepareCall, prepareCustomQuery, prepareForExecution, prepareForRemoteExecution, removeProperty, rowFromArguments, setAccessor, setArguments, setArgumentTypeNames, setArgumentTypes, setArgumentValues, setCall, setCascadePolicy, setDatasourceCall, setDescriptor, setEJBQLString, setFlushOnExecute, setIsPrepared, setIsUserDefined, setName, setProperties, setProperty, setQueryMechanism, setSelectionCriteria, setSession, setSessionName, setShouldBindAllParameters, setShouldBindAllParameters, setShouldCacheStatement, setShouldMaintainCache, setShouldPrepare, setShouldUseWrapperPolicy, setSQLStatement, setSQLString, setTranslationRow, shouldBindAllParameters, shouldCacheStatement, shouldCascadeAllParts, shouldCascadeByMapping, shouldCascadeOnlyDependentParts, shouldCascadeParts, shouldCascadePrivateParts, shouldCloneCall, shouldIgnoreBindAllParameters, shouldIgnoreCacheStatement, shouldMaintainCache, shouldPrepare, shouldUseWrapperPolicy, toString
protected Vector objects
public DeleteAllQuery()
public DeleteAllQuery(Class referenceClass)
public DeleteAllQuery(Class referenceClass, Expression selectionCriteria)
public boolean isDeleteAllQuery()
isDeleteAllQuery
in class DatabaseQuery
public Object executeInUnitOfWork(UnitOfWorkImpl unitOfWork, AbstractRecord translationRow) throws DatabaseException, OptimisticLockException
executeInUnitOfWork
in class ModifyAllQuery
unitOfWork
- translationRow
- DatabaseException
OptimisticLockException
public Object executeDatabaseQuery() throws DatabaseException
executeDatabaseQuery
in class DatabaseQuery
DatabaseException
- - an error has occurred on the database.public void executeDeleteAll(AbstractSession session, AbstractRecord translationRow, Vector objects) throws DatabaseException
DatabaseException
public Vector getObjects()
protected void prepare() throws QueryException
prepare
in class DatabaseQuery
QueryException
public void setObjects(Vector objectCollection)
Copyright © 2023. All rights reserved.