Top Description Constructors Methods
org.eclipse.persistence.queries

public Class UpdateObjectQuery

extends WriteObjectQuery
Class Inheritance
Imports
org.eclipse.persistence.descriptors.DescriptorQueryManager, org.eclipse.persistence.exceptions.*, org.eclipse.persistence.internal.sessions.AbstractRecord, .AbstractSession

Purpose: Used for updating existing objects into the database. This class does not have much behavior. It inherits most of it's behavior from WriteObjectQuery

Author
Yvon Lavoie
Since
TOPLink/Java 1.0

Constructor Summary

AccessConstructor and Description
public
UpdateObjectQuery()

PUBLIC: Default constructor.

public
UpdateObjectQuery(Object objectToUpdate)

PUBLIC: Create an update query with the object being updated.

public
UpdateObjectQuery(Call call)

PUBLIC: Create an update query with the custom call.

Method Summary

Modifier and TypeMethod and Description
protected DatabaseQuery
checkForCustomQuery(AbstractSession session, AbstractRecord translationRow)

Overrides org.eclipse.persistence.queries.DatabaseQuery.checkForCustomQuery.

INTERNAL: Check to see if a custom query should be used for this query.
public void
public void
protected QueryRedirector
getDefaultRedirector()

Overrides org.eclipse.persistence.queries.WriteObjectQuery.getDefaultRedirector.

INTERNAL: Returns the specific default redirector for this query type.
public boolean
isUpdateObjectQuery()

Overrides org.eclipse.persistence.queries.DatabaseQuery.isUpdateObjectQuery.

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

Overrides org.eclipse.persistence.queries.ObjectLevelModifyQuery.prepare.

INTERNAL: Prepare the receiver for execution in a session.
protected void
prepareCustomQuery(DatabaseQuery customQuery)

Overrides org.eclipse.persistence.queries.DatabaseQuery.prepareCustomQuery.

INTERNAL: Set the properties needed to be cascaded into the custom query.
Inherited from org.eclipse.persistence.queries.WriteObjectQuery:
executeDatabaseQueryisWriteObjectQueryprepareForExecution

Constructor Detail

UpdateObjectQueryback to summary
public UpdateObjectQuery()

PUBLIC: Default constructor.

UpdateObjectQueryback to summary
public UpdateObjectQuery(Object objectToUpdate)

PUBLIC: Create an update query with the object being updated.

UpdateObjectQueryback to summary
public UpdateObjectQuery(Call call)

PUBLIC: Create an update query with the custom call.

Method Detail

checkForCustomQueryback to summary
protected DatabaseQuery checkForCustomQuery(AbstractSession session, AbstractRecord translationRow)

Overrides org.eclipse.persistence.queries.DatabaseQuery.checkForCustomQuery.

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.

Annotations
@Override
executeCommitback to summary
public void executeCommit() throws DatabaseException, OptimisticLockException

Overrides org.eclipse.persistence.queries.WriteObjectQuery.executeCommit.

INTERNAL: Perform an update.

Annotations
@Override
executeCommitWithChangeSetback to summary
public void executeCommitWithChangeSet() throws DatabaseException, OptimisticLockException

Overrides org.eclipse.persistence.queries.WriteObjectQuery.executeCommitWithChangeSet.

INTERNAL: Perform an update.

Annotations
@Override
getDefaultRedirectorback to summary
protected QueryRedirector getDefaultRedirector()

Overrides org.eclipse.persistence.queries.WriteObjectQuery.getDefaultRedirector.

INTERNAL: Returns the specific default redirector for this query type. There are numerous default query redirectors. See ClassDescriptor for their types.

Annotations
@Override
isUpdateObjectQueryback to summary
public boolean isUpdateObjectQuery()

Overrides org.eclipse.persistence.queries.DatabaseQuery.isUpdateObjectQuery.

PUBLIC: Return if this is an update object query.

Annotations
@Override
prepareback to summary
protected void prepare()

Overrides org.eclipse.persistence.queries.ObjectLevelModifyQuery.prepare.

INTERNAL: Prepare the receiver for execution in a session.

Annotations
@Override
prepareCustomQueryback to summary
protected void prepareCustomQuery(DatabaseQuery customQuery)

Overrides org.eclipse.persistence.queries.DatabaseQuery.prepareCustomQuery.

INTERNAL: Set the properties needed to be cascaded into the custom query.

Annotations
@Override