Top Description Constructors Methods
org.eclipse.persistence.queries

public Class InsertObjectQuery

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

Purpose: Used for inserting new objects into the database.

Description: 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
InsertObjectQuery()

PUBLIC: Default constructor.

public
InsertObjectQuery(Object objectToInsert)

PUBLIC: Create an insert query with the object being inserted.

public
InsertObjectQuery(Call call)

PUBLIC: Create an insert 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
isInsertObjectQuery()

Overrides org.eclipse.persistence.queries.DatabaseQuery.isInsertObjectQuery.

PUBLIC: Return if this is an insert 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

InsertObjectQueryback to summary
public InsertObjectQuery()

PUBLIC: Default constructor.

InsertObjectQueryback to summary
public InsertObjectQuery(Object objectToInsert)

PUBLIC: Create an insert query with the object being inserted.

InsertObjectQueryback to summary
public InsertObjectQuery(Call call)

PUBLIC: Create an insert 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

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

INTERNAL: Perform an insert.

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

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

INTERNAL: Perform an insert.

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
isInsertObjectQueryback to summary
public boolean isInsertObjectQuery()

Overrides org.eclipse.persistence.queries.DatabaseQuery.isInsertObjectQuery.

PUBLIC: Return if this is an insert 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