EclipseLink 1.1.4, build 'v20100812-r7860' API Reference

org.eclipse.persistence.queries
Class ObjectLevelModifyQuery

java.lang.Object
  extended by org.eclipse.persistence.queries.DatabaseQuery
      extended by org.eclipse.persistence.queries.ModifyQuery
          extended by org.eclipse.persistence.queries.ObjectLevelModifyQuery
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
DeleteObjectQuery, WriteObjectQuery

public abstract class ObjectLevelModifyQuery
extends ModifyQuery

Purpose: Abstract class for all object modify queries.

Responsibilities:

See Also:
Serialized Form
Author:
Yvon Lavoie
Since:
TOPLink/Java 1.0

Field Summary
protected  java.lang.Object backupClone
           
protected  java.lang.Object object
           
protected  org.eclipse.persistence.internal.sessions.ObjectChangeSet objectChangeSet
           
protected  java.util.Vector primaryKey
           
 
Fields inherited from class org.eclipse.persistence.queries.ModifyQuery
forceBatchStatementExecution, modifyRow
 
Fields inherited from class org.eclipse.persistence.queries.DatabaseQuery
accessor, argumentFields, arguments, argumentTypeNames, argumentTypes, argumentValues, CascadeAggregateDelete, CascadeAllParts, CascadeByMapping, CascadeDependentParts, cascadePolicy, CascadePrivateParts, descriptor, doNotRedirect, executionSession, flushOnExecute, hintString, isCustomQueryUsed, isExecutionClone, isNativeConnectionRequired, isPrepared, isUserDefined, name, NoCascading, properties, queryMechanism, queryTimeout, redirector, session, sessionName, shouldBindAllParameters, shouldCacheStatement, shouldCloneCall, shouldMaintainCache, shouldPrepare, shouldUseWrapperPolicy, sourceMapping, translationRow
 
Constructor Summary
ObjectLevelModifyQuery()
          PUBLIC: Initialize the state of the query.
 
Method Summary
 void checkDescriptor(org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Ensure that the descriptor has been set.
 java.lang.Object executeInUnitOfWork(org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork, org.eclipse.persistence.internal.sessions.AbstractRecord translationRow)
          INTERNAL: All have done is move code from UnitOfWork.internalExecuteQuery
protected  java.lang.Object executeInUnitOfWorkObjectLevelModifyQuery(org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork, org.eclipse.persistence.internal.sessions.AbstractRecord translationRow)
          INTERNAL: This code was moved from UnitOfWork.internalExecuteQuery.
 java.lang.Object getBackupClone()
          INTERNAL: Return the backup clone of the object from the unit of work.
 java.lang.Object getObject()
          PUBLIC: Return the object required for modification.
 org.eclipse.persistence.internal.sessions.ObjectChangeSet getObjectChangeSet()
          PUBLIC: Return the ObjectChangeSet representing the object being changed
 java.util.Vector getPrimaryKey()
          INTERNAL: Get the primary key for the query
 java.lang.Class getReferenceClass()
          Return the domain class associated with this query.
 java.lang.String getReferenceClassName()
          INTERNAL: Return the reference class for a query Note: Although the API is designed to avoid classpath dependencies 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(java.lang.Object backupClone)
          INTERNAL: Set the backup clone of the object from the unit of work.
 void setObject(java.lang.Object object)
          PUBLIC: (REQUIRED) Set the object required for modification.
 void setObjectChangeSet(org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet)
          INTERNAL: Set the ObjectChangeSet representing the object to be written
 void setPrimaryKey(java.util.Vector primaryKey)
          INTERNAL: Set the primary key for the query.
 java.lang.String toString()
           
 
Methods inherited from class org.eclipse.persistence.queries.ModifyQuery
forceBatchStatementExecution, getModifyRow, isModifyQuery, setForceBatchStatementExecution, setModifyRow
 
Methods inherited from class org.eclipse.persistence.queries.DatabaseQuery
addArgument, addArgument, addArgument, addArgumentByTypeName, addArgumentValue, addArgumentValues, addCall, addStatement, bindAllParameters, buildArgumentFields, buildSelectionCriteria, cacheStatement, cascadeAllParts, cascadeByMapping, cascadeOnlyDependentParts, cascadePrivateParts, checkEarlyReturn, checkForCustomQuery, checkPrepare, checkPrepare, clone, clonedQueryExecutionComplete, convertClassNamesToClasses, copyFromQuery, dontBindAllParameters, dontCacheStatement, dontCascadeParts, dontMaintainCache, execute, executeDatabaseQuery, extractRemoteResult, getAccessor, getArguments, getArgumentTypeNames, getArgumentTypes, getArgumentValues, getCall, getCascadePolicy, getDatasourceCall, getDatasourceCalls, getDefaultRedirector, getDescriptor, getDomainClassNounName, getDoNotRedirect, getEJBQLString, getExecutionSession, getFlushOnExecute, getHintString, getJPQLString, getName, getProperties, getProperty, getQueryMechanism, getQueryNounName, getQueryTimeout, getRedirector, getSelectionCriteria, getSensorName, getSession, getSessionName, getShouldBindAllParameters, getSourceMapping, getSQLStatement, getSQLString, getSQLStrings, getTranslatedSQLString, getTranslatedSQLStrings, getTranslationRow, hasAccessor, hasArguments, hasProperties, hasQueryMechanism, hasSessionName, ignoreBindAllParameters, ignoreCacheStatement, isCallQuery, isCascadeOfAggregateDelete, isCustomQueryUsed, isCustomSelectionQuery, isDataModifyQuery, isDataReadQuery, isDefaultPropertiesQuery, isDeleteAllQuery, isDeleteObjectQuery, isDirectReadQuery, isExecutionClone, isExpressionQuery, isInsertObjectQuery, isJPQLCallQuery, isModifyAllQuery, isNativeConnectionRequired, isObjectBuildingQuery, isObjectLevelReadQuery, isPrepared, isReadAllQuery, isReadObjectQuery, isReadQuery, isReportQuery, isSQLCallQuery, isUpdateAllQuery, isUpdateObjectQuery, isUserDefined, isValueReadQuery, isWriteObjectQuery, maintainCache, prepareCall, prepareCustomQuery, prepareForRemoteExecution, prepareFromQuery, redirectQuery, remoteExecute, remoteExecute, removeProperty, replaceValueHoldersIn, rowFromArguments, setAccessor, setArguments, setArgumentTypeNames, setArgumentTypes, setArgumentValues, setCall, setCascadePolicy, setDatasourceCall, setDescriptor, setDoNotRedirect, setEJBQLString, setExecutionSession, setFlushOnExecute, setHintString, setIsCustomQueryUsed, setIsExecutionClone, setIsNativeConnectionRequired, setIsPrepared, setIsUserDefined, setJPQLString, setName, setProperties, setProperty, setQueryMechanism, setQueryTimeout, setRedirector, setSelectionCriteria, setSession, setSessionName, setShouldBindAllParameters, setShouldBindAllParameters, setShouldCacheStatement, setShouldMaintainCache, setShouldPrepare, setShouldUseWrapperPolicy, setSourceMapping, setSQLStatement, setSQLString, setTranslationRow, shouldBindAllParameters, shouldCacheStatement, shouldCascadeAllParts, shouldCascadeByMapping, shouldCascadeOnlyDependentParts, shouldCascadeParts, shouldCascadePrivateParts, shouldCloneCall, shouldIgnoreBindAllParameters, shouldIgnoreCacheStatement, shouldMaintainCache, shouldPrepare, shouldUseWrapperPolicy
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

primaryKey

protected java.util.Vector primaryKey

object

protected java.lang.Object object

objectChangeSet

protected org.eclipse.persistence.internal.sessions.ObjectChangeSet objectChangeSet

backupClone

protected java.lang.Object backupClone
Constructor Detail

ObjectLevelModifyQuery

public ObjectLevelModifyQuery()
PUBLIC: Initialize the state of the query.

Method Detail

checkDescriptor

public void checkDescriptor(org.eclipse.persistence.internal.sessions.AbstractSession session)
                     throws QueryException
INTERNAL: Ensure that the descriptor has been set.

Overrides:
checkDescriptor in class DatabaseQuery
Throws:
QueryException

executeInUnitOfWork

public java.lang.Object executeInUnitOfWork(org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
                                            org.eclipse.persistence.internal.sessions.AbstractRecord translationRow)
                                     throws DatabaseException
INTERNAL: All have done is move code from UnitOfWork.internalExecuteQuery

Overrides:
executeInUnitOfWork in class DatabaseQuery
Parameters:
unitOfWork - - the session in which the receiver will be executed.
translationRow - - the arguments
Returns:
An object, the result of executing the query.
Throws:
DatabaseException - - an error has occurred on the database.

executeInUnitOfWorkObjectLevelModifyQuery

protected java.lang.Object executeInUnitOfWorkObjectLevelModifyQuery(org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
                                                                     org.eclipse.persistence.internal.sessions.AbstractRecord translationRow)
                                                              throws DatabaseException,
                                                                     OptimisticLockException
INTERNAL: This code was moved from UnitOfWork.internalExecuteQuery.

Throws:
DatabaseException
OptimisticLockException

getBackupClone

public java.lang.Object getBackupClone()
INTERNAL: Return the backup clone of the object from the unit of work.


getObject

public java.lang.Object getObject()
PUBLIC: Return the object required for modification.


getObjectChangeSet

public org.eclipse.persistence.internal.sessions.ObjectChangeSet getObjectChangeSet()
PUBLIC: Return the ObjectChangeSet representing the object being changed


getPrimaryKey

public java.util.Vector getPrimaryKey()
INTERNAL: Get the primary key for the query


getReferenceClass

public java.lang.Class getReferenceClass()
Return the domain class associated with this query.

Overrides:
getReferenceClass in class DatabaseQuery

getReferenceClassName

public java.lang.String getReferenceClassName()
INTERNAL: Return the reference class for a query Note: Although the API is designed to avoid classpath dependencies for the MW, since the object is specified at runtime, this will not be an issue.

Overrides:
getReferenceClassName in class DatabaseQuery

isObjectLevelModifyQuery

public boolean isObjectLevelModifyQuery()
PUBLIC: Return if this is an object level modify query.

Overrides:
isObjectLevelModifyQuery in class DatabaseQuery

prepare

protected void prepare()
                throws QueryException
INTERNAL: Prepare the receiver for execution in a session. In particular check that the tables on the descriptor are set.

Overrides:
prepare in class DatabaseQuery
Throws:
QueryException

prepareForExecution

public void prepareForExecution()
                         throws QueryException
INTERNAL: Prepare the receiver for execution in a session. In particular check that the tables on the descriptor are set.

Overrides:
prepareForExecution in class DatabaseQuery
Throws:
QueryException

setBackupClone

public void setBackupClone(java.lang.Object backupClone)
INTERNAL: Set the backup clone of the object from the unit of work.


setObject

public void setObject(java.lang.Object object)
PUBLIC: (REQUIRED) Set the object required for modification.


setObjectChangeSet

public void setObjectChangeSet(org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet)
INTERNAL: Set the ObjectChangeSet representing the object to be written


setPrimaryKey

public void setPrimaryKey(java.util.Vector primaryKey)
INTERNAL: Set the primary key for the query.


toString

public java.lang.String toString()
Overrides:
toString in class DatabaseQuery

EclipseLink 1.1.4, build 'v20100812-r7860' API Reference