Methods Summary |
---|
protected oracle.toplink.essentials.queryframework.DatabaseQuery | checkForCustomQuery(oracle.toplink.essentials.internal.sessions.AbstractSession session, oracle.toplink.essentials.internal.sessions.AbstractRecord translationRow)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.
checkDescriptor(session);
// check if user defined a custom query
DescriptorQueryManager queryManager = getDescriptor().getQueryManager();
if ((!isCallQuery())// this is not a hand-coded (custom SQL, SDK etc.) call
&&(!isUserDefined())// and this is not a user-defined query (in the query manager)
&&queryManager.hasDeleteQuery()) {// and there is a user-defined query (in the query manager)
return queryManager.getDeleteQuery();
}
return null;
|
public void | executeCommit()INTERNAL:
Perform a delete.
// object will only be null if the transaction is being commited directly from a changeset
if (getObject() != null) {
// if the object is not null then it is more effecient to build the row from the
// object then the changeSet.
getQueryMechanism().deleteObjectForWrite();
} else {
// TODO: Must this case be implemented?
// has a changeSet so we must use it in the case that there is no object
// getQueryMechanism().deleteObjectForWriteWithChangeSet();
}
|
protected java.lang.Object | executeInUnitOfWorkObjectLevelModifyQuery(oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl unitOfWork, oracle.toplink.essentials.internal.sessions.AbstractRecord translationRow)INTERNAL:
Code was moved from UnitOfWork.internalExecuteQuery
Object result = unitOfWork.processDeleteObjectQuery(this);
if (result != null) {
// if the above method returned something then the unit of work
//was not writing so the object has been stored to delete later
//so return the object. See the above method for the cases
//where this object will be returned.
return result;
}
return super.executeInUnitOfWorkObjectLevelModifyQuery(unitOfWork, translationRow);
|
public void | executeShallowWrite()INTERNAL:
Perform a shallow delete.
getQueryMechanism().shallowDeleteObjectForWrite(getObject(), this, getSession().getCommitManager());
|
public boolean | isDeleteObjectQuery()PUBLIC:
Return if this is a delete object query.
return true;
|
protected void | prepare()INTERNAL:
Prepare the receiver for execution in a session.
super.prepare();
getQueryMechanism().prepareDeleteObject();
|
protected void | prepareCustomQuery(oracle.toplink.essentials.queryframework.DatabaseQuery customQuery)INTERNAL:
Set the properties needed to be cascaded into the custom query.
DeleteObjectQuery customDeleteQuery = (DeleteObjectQuery)customQuery;
customDeleteQuery.setObject(getObject());
customDeleteQuery.setObjectChangeSet(getObjectChangeSet());
customDeleteQuery.setCascadePolicy(getCascadePolicy());
customDeleteQuery.setShouldMaintainCache(shouldMaintainCache());
customDeleteQuery.setTranslationRow(customDeleteQuery.getDescriptor().getObjectBuilder().buildRow(getObject(), customDeleteQuery.getSession()));
|
public void | prepareForExecution()INTERNAL:
Prepare the receiver for execution in a session. In particular,
verify that the object is not null and contains a valid primary key.
super.prepareForExecution();
// Add the write lock field if required
if (getDescriptor().usesOptimisticLocking()) {
getDescriptor().getOptimisticLockingPolicy().addLockValuesToTranslationRow(this);
}
|