|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.persistence.queries.DatabaseQuery
org.eclipse.persistence.queries.ModifyQuery
org.eclipse.persistence.queries.ObjectLevelModifyQuery
org.eclipse.persistence.queries.DeleteObjectQuery
public class DeleteObjectQuery
Purpose: Used for deleting objects.
Responsibilities: Extract primary key from object and delete it.
Field Summary | |
---|---|
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. |
Fields inherited from class org.eclipse.persistence.queries.ObjectLevelModifyQuery |
---|
backupClone, object, objectChangeSet, primaryKey |
Fields inherited from class org.eclipse.persistence.queries.ModifyQuery |
---|
forceBatchStatementExecution, modifyRow |
Constructor Summary | |
---|---|
DeleteObjectQuery()
|
|
DeleteObjectQuery(Call call)
|
|
DeleteObjectQuery(java.lang.Object objectToDelete)
|
Method Summary | |
---|---|
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. |
Methods inherited from class org.eclipse.persistence.queries.ObjectLevelModifyQuery |
---|
checkDescriptor, executeInUnitOfWork, getBackupClone, getObject, getObjectChangeSet, getPrimaryKey, getReferenceClass, getReferenceClassName, isObjectLevelModifyQuery, resetMonitorName, setBackupClone, setObjectChangeSet, setPrimaryKey, toString |
Methods inherited from class org.eclipse.persistence.queries.ModifyQuery |
---|
forceBatchStatementExecution, getModifyRow, isModifyQuery, setForceBatchStatementExecution, setModifyRow |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected boolean isFullRowRequired
protected boolean usesOptimisticLocking
Constructor Detail |
---|
public DeleteObjectQuery()
public DeleteObjectQuery(java.lang.Object objectToDelete)
public DeleteObjectQuery(Call call)
Method Detail |
---|
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
|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |