Top Description Fields Constructors Methods
org.eclipse.persistence.queries

public abstract Class ObjectLevelModifyQuery

extends ModifyQuery
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.queries.WriteObjectQuery, org.eclipse.persistence.queries.DeleteObjectQuery
Imports
org.eclipse.persistence.internal.helper.*, org.eclipse.persistence.internal.sessions.*, org.eclipse.persistence.exceptions.*, org.eclipse.persistence.descriptors.ClassDescriptor

Purpose: Abstract class for all object modify queries.

Responsibilities:

Author
Yvon Lavoie
Since
TOPLink/Java 1.0

Field Summary

Modifier and TypeField and Description
protected Object
protected Object
protected ObjectChangeSet
protected Object
Inherited from org.eclipse.persistence.queries.ModifyQuery:
forceBatchStatementExecutionisBatchExecutionSupportedmodifyRow

Constructor Summary

AccessConstructor and Description
protected
ObjectLevelModifyQuery()

PUBLIC: Initialize the state of the query.

Method Summary

Modifier and TypeMethod and Description
public void
checkDescriptor(AbstractSession session)

Overrides org.eclipse.persistence.queries.DatabaseQuery.checkDescriptor.

INTERNAL: Ensure that the descriptor has been set.
public Object
executeInUnitOfWork(UnitOfWorkImpl
- the session in which the receiver will be executed.
unitOfWork
,
AbstractRecord
- the arguments
translationRow
)

Overrides org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork.

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.

public Object
getBackupClone()

INTERNAL: Return the backup clone of the object from the unit of work.

public Object
getObject()

PUBLIC: Return the object required for modification.

public ObjectChangeSet
getObjectChangeSet()

PUBLIC: Return the ObjectChangeSet representing the object being changed

public Object
getPrimaryKey()

INTERNAL: Get the primary key for the query

public Class<?>
getReferenceClass()

Overrides org.eclipse.persistence.queries.DatabaseQuery.getReferenceClass.

Return the domain class associated with this query.
public String
getReferenceClassName()

Overrides org.eclipse.persistence.queries.DatabaseQuery.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.
public boolean
isObjectLevelModifyQuery()

Overrides org.eclipse.persistence.queries.DatabaseQuery.isObjectLevelModifyQuery.

PUBLIC: Return if this is an object level modify query.
protected void
prepare()

Overrides org.eclipse.persistence.queries.DatabaseQuery.prepare.

INTERNAL: Prepare the receiver for execution in a session.
public void
prepareForExecution()

Overrides org.eclipse.persistence.queries.DatabaseQuery.prepareForExecution.

INTERNAL: Prepare the receiver for execution in a session.
public void
resetMonitorName()

Overrides org.eclipse.persistence.queries.DatabaseQuery.resetMonitorName.

INTERNAL: Return the name to use for the query in performance monitoring.
public void
setBackupClone(Object backupClone)

INTERNAL: Set the backup clone of the object from the unit of work.

public void
setObject(Object object)

PUBLIC: (REQUIRED) Set the object required for modification.

public void
setObjectChangeSet(ObjectChangeSet changeSet)

INTERNAL: Set the ObjectChangeSet representing the object to be written

public void
setPrimaryKey(Object primaryKey)

INTERNAL: Set the primary key for the query.

public String
toString()

Overrides org.eclipse.persistence.queries.DatabaseQuery.toString.

Returns a string representation of the object.
Inherited from org.eclipse.persistence.queries.ModifyQuery:
forceBatchStatementExecutiongetModifyRowisBatchExecutionSupportedisModifyQuerysetForceBatchStatementExecutionsetIsBatchExecutionSupportedsetModifyRow

Field Detail

backupCloneback to summary
protected Object backupClone
objectback to summary
protected Object object
objectChangeSetback to summary
protected ObjectChangeSet objectChangeSet
primaryKeyback to summary
protected Object primaryKey

Constructor Detail

ObjectLevelModifyQueryback to summary
protected ObjectLevelModifyQuery()

PUBLIC: Initialize the state of the query.

Method Detail

checkDescriptorback to summary
public void checkDescriptor(AbstractSession session) throws QueryException

Overrides org.eclipse.persistence.queries.DatabaseQuery.checkDescriptor.

INTERNAL: Ensure that the descriptor has been set.

Annotations
@Override
executeInUnitOfWorkback to summary
public Object executeInUnitOfWork(UnitOfWorkImpl unitOfWork, AbstractRecord translationRow) throws DatabaseException

Overrides org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork.

INTERNAL: All have done is move code from UnitOfWork.internalExecuteQuery

Parameters
unitOfWork:UnitOfWorkImpl

Doc from org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork.

- the session in which the receiver will be executed.

translationRow:AbstractRecord

Doc from org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork.

- the arguments

Returns:Object

Doc from org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork.

An object, the result of executing the query.

Annotations
@Override
Exceptions
DatabaseException:

Doc from org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork.

- an error has occurred on the database.

executeInUnitOfWorkObjectLevelModifyQueryback to summary
protected Object executeInUnitOfWorkObjectLevelModifyQuery(UnitOfWorkImpl unitOfWork, AbstractRecord translationRow) throws DatabaseException, OptimisticLockException

INTERNAL: This code was moved from UnitOfWork.internalExecuteQuery.

getBackupCloneback to summary
public Object getBackupClone()

INTERNAL: Return the backup clone of the object from the unit of work.

getObjectback to summary
public Object getObject()

PUBLIC: Return the object required for modification.

getObjectChangeSetback to summary
public ObjectChangeSet getObjectChangeSet()

PUBLIC: Return the ObjectChangeSet representing the object being changed

getPrimaryKeyback to summary
public Object getPrimaryKey()

INTERNAL: Get the primary key for the query

getReferenceClassback to summary
public Class<?> getReferenceClass()

Overrides org.eclipse.persistence.queries.DatabaseQuery.getReferenceClass.

Return the domain class associated with this query.

Annotations
@Override
getReferenceClassNameback to summary
public String getReferenceClassName()

Overrides org.eclipse.persistence.queries.DatabaseQuery.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.

Annotations
@Override
isObjectLevelModifyQueryback to summary
public boolean isObjectLevelModifyQuery()

Overrides org.eclipse.persistence.queries.DatabaseQuery.isObjectLevelModifyQuery.

PUBLIC: Return if this is an object level modify query.

Annotations
@Override
prepareback to summary
protected void prepare() throws QueryException

Overrides org.eclipse.persistence.queries.DatabaseQuery.prepare.

INTERNAL: Prepare the receiver for execution in a session. In particular check that the tables on the descriptor are set.

Annotations
@Override
prepareForExecutionback to summary
public void prepareForExecution() throws QueryException

Overrides org.eclipse.persistence.queries.DatabaseQuery.prepareForExecution.

INTERNAL: Prepare the receiver for execution in a session. In particular check that the tables on the descriptor are set.

Annotations
@Override
resetMonitorNameback to summary
public void resetMonitorName()

Overrides org.eclipse.persistence.queries.DatabaseQuery.resetMonitorName.

INTERNAL: Return the name to use for the query in performance monitoring.

Annotations
@Override
setBackupCloneback to summary
public void setBackupClone(Object backupClone)

INTERNAL: Set the backup clone of the object from the unit of work.

setObjectback to summary
public void setObject(Object object)

PUBLIC: (REQUIRED) Set the object required for modification.

setObjectChangeSetback to summary
public void setObjectChangeSet(ObjectChangeSet changeSet)

INTERNAL: Set the ObjectChangeSet representing the object to be written

setPrimaryKeyback to summary
public void setPrimaryKey(Object primaryKey)

INTERNAL: Set the primary key for the query.

toStringback to summary
public String toString()

Overrides org.eclipse.persistence.queries.DatabaseQuery.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override