public abstract class ObjectLevelModifyQuery extends ModifyQuery
Purpose: Abstract class for all object modify queries.
Responsibilities:
Modifier and Type | Field and Description |
---|---|
protected Object |
backupClone |
protected Object |
object |
protected ObjectChangeSet |
objectChangeSet |
protected Vector |
primaryKey |
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 |
---|
ObjectLevelModifyQuery()
PUBLIC:
Initialize the state of the query.
|
Modifier and Type | Method and Description |
---|---|
void |
checkDescriptor(AbstractSession session)
INTERNAL:
Ensure that the descriptor has been set.
|
Object |
executeInUnitOfWork(UnitOfWorkImpl unitOfWork,
AbstractRecord translationRow)
INTERNAL:
All have done is move code from UnitOfWork.internalExecuteQuery
|
protected Object |
executeInUnitOfWorkObjectLevelModifyQuery(UnitOfWorkImpl unitOfWork,
AbstractRecord translationRow)
INTERNAL:
This code was moved from UnitOfWork.internalExecuteQuery
|
Object |
getBackupClone()
INTERNAL:
Return the backup clone of the object from the unit of work.
|
Object |
getObject()
PUBLIC:
Return the object required for modification.
|
ObjectChangeSet |
getObjectChangeSet()
PUBLIC:
Return the ObjectChangeSet representing the object being changed
|
Vector |
getPrimaryKey()
INTERNAL:
Get the primary key for the query
|
Class |
getReferenceClass()
Return the domain class associated with this query.
|
String |
getReferenceClassName()
INTERNAL:
Return the reference class for a query
Note: Although the API is designed to avoid classpath dependancies for the MW, since the object
is specified at runtime, this will not be an issue.
|
boolean |
isObjectLevelModifyQuery()
PUBLIC:
Return if this is an object level modify query.
|
protected void |
prepare()
INTERNAL:
Prepare the receiver for execution in a session.
|
void |
prepareForExecution()
INTERNAL:
Prepare the receiver for execution in a session.
|
void |
setBackupClone(Object backupClone)
INTERNAL:
Set the backup clone of the object from the unit of work.
|
void |
setObject(Object object)
PUBLIC (REQUIRED):
Set the object required for modification.
|
void |
setObjectChangeSet(ObjectChangeSet changeSet)
INTERNAL:
Set the ObjectChangeSet representing the object to be written
|
void |
setPrimaryKey(Vector primaryKey)
INTERNAL:
Set the primary key for the query.
|
String |
toString() |
forceBatchStatementExecution, getModifyRow, isModifyQuery, setForceBatchStatementExecution, setModifyRow
addArgument, addArgument, addArgument, addArgumentByTypeName, addArgumentValue, addArgumentValues, addCall, addStatement, bindAllParameters, buildSelectionCriteria, cacheStatement, cascadeAllParts, cascadeByMapping, cascadeOnlyDependentParts, cascadePrivateParts, checkEarlyReturn, checkForCustomQuery, checkPrepare, clone, clonedQueryExecutionComplete, convertClassNamesToClasses, deploymentSetShouldMaintainCache, deploymentShouldMaintainCache, dontBindAllParameters, dontCacheStatement, dontCascadeParts, dontMaintainCache, execute, executeDatabaseQuery, 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, isDeleteAllQuery, isDeleteObjectQuery, isExpressionQuery, isInsertObjectQuery, isModifyAllQuery, isObjectBuildingQuery, isObjectLevelReadQuery, isPrepared, isReadAllQuery, isReadObjectQuery, isReadQuery, isReportQuery, isSQLCallQuery, isUpdateAllQuery, isUpdateObjectQuery, isUserDefined, isWriteObjectQuery, maintainCache, prepareCall, prepareCustomQuery, 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
protected Vector primaryKey
protected Object object
protected ObjectChangeSet objectChangeSet
protected Object backupClone
public ObjectLevelModifyQuery()
public void checkDescriptor(AbstractSession session) throws QueryException
checkDescriptor
in class DatabaseQuery
QueryException
public Object executeInUnitOfWork(UnitOfWorkImpl unitOfWork, AbstractRecord translationRow) throws DatabaseException
executeInUnitOfWork
in class DatabaseQuery
unitOfWork
- - the session in which the receiver will be executed.translationRow
- - the argumentsDatabaseException
- - an error has occurred on the database.protected Object executeInUnitOfWorkObjectLevelModifyQuery(UnitOfWorkImpl unitOfWork, AbstractRecord translationRow) throws DatabaseException, OptimisticLockException
unitOfWork
- translationRow
- DatabaseException
OptimisticLockException
public Object getBackupClone()
public Object getObject()
public ObjectChangeSet getObjectChangeSet()
public Vector getPrimaryKey()
public Class getReferenceClass()
getReferenceClass
in class DatabaseQuery
public String getReferenceClassName()
getReferenceClassName
in class DatabaseQuery
public boolean isObjectLevelModifyQuery()
isObjectLevelModifyQuery
in class DatabaseQuery
protected void prepare() throws QueryException
prepare
in class DatabaseQuery
QueryException
public void prepareForExecution() throws QueryException
prepareForExecution
in class DatabaseQuery
QueryException
public void setBackupClone(Object backupClone)
public void setObject(Object object)
public void setObjectChangeSet(ObjectChangeSet changeSet)
public void setPrimaryKey(Vector primaryKey)
public String toString()
toString
in class DatabaseQuery
Copyright © 2021. All rights reserved.