Purpose: Used for deleting objects.
Responsibilities: Extract primary key from object and delete it.
| 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. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected DatabaseQuery | checkForCustomQuery(AbstractSession session, AbstractRecord translationRow)
Overrides org. |
| public Object | Returns: object - the object being deleted.Implements abstract org. |
| protected Object | executeInUnitOfWorkObjectLevelModifyQuery(UnitOfWorkImpl unitOfWork, AbstractRecord translationRow)
Overrides org. |
| protected QueryRedirector | getDefaultRedirector()
Overrides org. |
| public boolean | isDeleteObjectQuery()
Overrides org. |
| public boolean | |
| protected void | prepare()
Overrides org. |
| protected void | prepareCustomQuery(DatabaseQuery customQuery)
Overrides org. |
| public void | prepareForExecution()
Overrides org. |
| public void | setIsFullRowRequired(boolean isFullRowRequired)
ADVANCED: Set if the full row is required by the delete query. |
| public void | setObject(Object object)
Overrides org. |
| protected boolean | shouldUseOptimisticLocking(Object object)
INTERNAL: Determines whether the query should use optimistic locking with the passed object. |
| public boolean |
| isFullRowRequired | back to summary |
|---|---|
| protected boolean isFullRowRequired PERF: By default only the translation row is used for deletes, the full row can be requested for custom deletes. | |
| usesOptimisticLocking | back to summary |
|---|---|
| protected boolean usesOptimisticLocking Indicates whether the query should use optimistic locking. | |
| DeleteObjectQuery | back to summary |
|---|---|
| public DeleteObjectQuery() | |
| DeleteObjectQuery | back to summary |
|---|---|
| public DeleteObjectQuery(Object objectToDelete) | |
| DeleteObjectQuery | back to summary |
|---|---|
| public DeleteObjectQuery(Call call) | |
| checkForCustomQuery | back to summary |
|---|---|
| protected DatabaseQuery checkForCustomQuery(AbstractSession session, AbstractRecord translationRow) Overrides org. 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.
| |
| executeDatabaseQuery | back to summary |
|---|---|
| public Object executeDatabaseQuery() throws DatabaseException, OptimisticLockException Implements abstract org. INTERNAL: Perform the work to delete an object.
| |
| executeInUnitOfWorkObjectLevelModifyQuery | back to summary |
|---|---|
| protected Object executeInUnitOfWorkObjectLevelModifyQuery(UnitOfWorkImpl unitOfWork, AbstractRecord translationRow) throws DatabaseException, OptimisticLockException Overrides org. INTERNAL: Code was moved from UnitOfWork.internalExecuteQuery
| |
| getDefaultRedirector | back to summary |
|---|---|
| protected QueryRedirector getDefaultRedirector() Overrides org. INTERNAL: Returns the specific default redirector for this query type. There are numerous default query redirectors. See ClassDescriptor for their types.
| |
| isDeleteObjectQuery | back to summary |
|---|---|
| public boolean isDeleteObjectQuery() Overrides org. PUBLIC: Return if this is a delete object query.
| |
| isFullRowRequired | back to summary |
|---|---|
| public boolean isFullRowRequired() ADVANCED: Return if the full row is required by the delete query. This can be set on custom delete queries if more than the objects primary key and version is required. | |
| prepare | back to summary |
|---|---|
| protected void prepare() Overrides org. INTERNAL: Prepare the receiver for execution in a session.
| |
| prepareCustomQuery | back to summary |
|---|---|
| protected void prepareCustomQuery(DatabaseQuery customQuery) Overrides org. INTERNAL: Set the properties needed to be cascaded into the custom query. A custom query is set by the user, or used by default to allow caching of the prepared query. In a unit of work the custom query is used directly, so this step is bypassed.
| |
| prepareForExecution | back to summary |
|---|---|
| public void prepareForExecution() throws QueryException Overrides org. INTERNAL: Prepare the receiver for execution in a session. In particular, verify that the object is not null and contains a valid primary key.
| |
| setIsFullRowRequired | back to summary |
|---|---|
| public void setIsFullRowRequired(boolean isFullRowRequired) ADVANCED: Set if the full row is required by the delete query. This can be set on custom delete queries if more than the objects primary key and version is required. | |
| setObject | back to summary |
|---|---|
| public void setObject(Object object) Overrides org. PUBLIC: (REQUIRED) Set the object required for modification.
| |
| shouldUseOptimisticLocking | back to summary |
|---|---|
| protected boolean shouldUseOptimisticLocking(Object object) INTERNAL: Determines whether the query should use optimistic locking with the passed object. | |
| usesOptimisticLocking | back to summary |
|---|---|
| public boolean usesOptimisticLocking() INTERNAL: Indicating whether the query should use optimistic locking. | |