Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

E28847-01


org.eclipse.persistence.queries
Class InsertObjectQuery

java.lang.Object
  extended by org.eclipse.persistence.queries.DatabaseQuery
      extended by org.eclipse.persistence.queries.ModifyQuery
          extended by org.eclipse.persistence.queries.ObjectLevelModifyQuery
              extended by org.eclipse.persistence.queries.WriteObjectQuery
                  extended by org.eclipse.persistence.queries.InsertObjectQuery

All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class InsertObjectQuery
extends WriteObjectQuery

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

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

Field Summary

 

Fields inherited from class org.eclipse.persistence.queries.ObjectLevelModifyQuery
backupClone, object, objectChangeSet, primaryKey

 

Fields inherited from class org.eclipse.persistence.queries.ModifyQuery
forceBatchStatementExecution, modifyRow

 

Fields inherited from class org.eclipse.persistence.queries.DatabaseQuery
accessors, allowNativeSQLQuery, argumentFields, arguments, argumentTypeNames, argumentTypes, argumentValues, BATCH_FETCH_PROPERTY, CascadeAggregateDelete, CascadeAllParts, CascadeByMapping, CascadeDependentParts, cascadePolicy, CascadePrivateParts, descriptor, doNotRedirect, executionSession, flushOnExecute, hintString, isCustomQueryUsed, isExecutionClone, isNativeConnectionRequired, isPrepared, isUserDefined, isUserDefinedSQLCall, monitorName, name, NoCascading, nullableArguments, parameterDelimiter, partitioningPolicy, properties, queryMechanism, queryTimeout, redirector, session, sessionName, shouldBindAllParameters, shouldCacheStatement, shouldCloneCall, shouldMaintainCache, shouldPrepare, shouldRetrieveBypassCache, shouldStoreBypassCache, shouldUseWrapperPolicy, shouldValidateUpdateCallCacheUse, sourceMapping, translationRow

 

Constructor Summary
InsertObjectQuery()
          PUBLIC: Default constructor.
InsertObjectQuery(Call call)
          PUBLIC: Create an insert query with the custom call.
InsertObjectQuery(java.lang.Object objectToInsert)
          PUBLIC: Create an insert query with the object being inserted.

 

Method Summary
protected  DatabaseQuery checkForCustomQuery(org.eclipse.persistence.internal.sessions.AbstractSession session, org.eclipse.persistence.internal.sessions.AbstractRecord translationRow)
          INTERNAL: Check to see if a custom query should be used for this query.
 void executeCommit()
          INTERNAL: Perform an insert.
 void executeCommitWithChangeSet()
          INTERNAL: Perform an insert.
protected  QueryRedirector getDefaultRedirector()
          INTERNAL: Returns the specific default redirector for this query type.
 boolean isInsertObjectQuery()
          PUBLIC: Return if this is an insert object query.
protected  void prepare()
          INTERNAL: Prepare the receiver for execution in a session.
protected  void prepareCustomQuery(DatabaseQuery customQuery)
          INTERNAL: Set the properties needed to be cascaded into the custom query.

 

Methods inherited from class org.eclipse.persistence.queries.WriteObjectQuery
executeDatabaseQuery, isWriteObjectQuery, prepareForExecution

 

Methods inherited from class org.eclipse.persistence.queries.ObjectLevelModifyQuery
checkDescriptor, executeInUnitOfWork, executeInUnitOfWorkObjectLevelModifyQuery, getBackupClone, getObject, getObjectChangeSet, getPrimaryKey, getReferenceClass, getReferenceClassName, isObjectLevelModifyQuery, resetMonitorName, setBackupClone, setObject, setObjectChangeSet, setPrimaryKey, 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, addArgument, addArgumentByTypeName, addArgumentValue, addArgumentValues, addCall, addStatement, bindAllParameters, buildArgumentFields, buildSelectionCriteria, cacheStatement, cascadeAllParts, cascadeByMapping, cascadeOnlyDependentParts, cascadePrivateParts, checkEarlyReturn, checkPrepare, checkPrepare, clone, clonedQueryExecutionComplete, convertClassNamesToClasses, copyFromQuery, dontBindAllParameters, dontCacheStatement, dontCascadeParts, dontMaintainCache, execute, extractRemoteResult, getAccessor, getAccessors, getArguments, getArgumentTypeNames, getArgumentTypes, getArgumentValues, getBatchObjects, getCall, getCascadePolicy, getDatasourceCall, getDatasourceCalls, getDescriptor, getDoNotRedirect, getEJBQLString, getExecutionSession, getFlushOnExecute, getHintString, getJPQLString, getMonitorName, getName, getNullableArguments, getParameterDelimiter, getParameterDelimiterChar, getPartitioningPolicy, getProperties, getProperty, getQueryMechanism, getQueryTimeout, getRedirector, getSelectionCriteria, getSession, getSessionName, getShouldBindAllParameters, getSourceMapping, getSQLStatement, getSQLString, getSQLStrings, getTranslatedSQLString, getTranslatedSQLStrings, getTranslationRow, hasAccessor, hasArguments, hasNullableArguments, hasProperties, hasQueryMechanism, hasSessionName, ignoreBindAllParameters, ignoreCacheStatement, isCallQuery, isCascadeOfAggregateDelete, isCustomQueryUsed, isCustomSelectionQuery, isDataModifyQuery, isDataReadQuery, isDefaultPropertiesQuery, isDeleteAllQuery, isDeleteObjectQuery, isDirectReadQuery, isExecutionClone, isExpressionQuery, isJPQLCallQuery, isModifyAllQuery, isNativeConnectionRequired, isObjectBuildingQuery, isObjectLevelReadQuery, isPrepared, isReadAllQuery, isReadObjectQuery, isReadQuery, isReportQuery, isSQLCallQuery, isUpdateAllQuery, isUpdateObjectQuery, isUserDefined, isUserDefinedSQLCall, isValueReadQuery, maintainCache, prepareCall, prepareForRemoteExecution, prepareFromQuery, redirectQuery, remoteExecute, remoteExecute, removeProperty, replaceValueHoldersIn, retrieveBypassCache, rowFromArguments, setAccessor, setAccessors, setAllowNativeSQLQuery, setArguments, setArgumentTypeNames, setArgumentTypes, setArgumentValues, setBatchObjects, setCall, setCascadePolicy, setDatasourceCall, setDescriptor, setDoNotRedirect, setEJBQLString, setExecutionSession, setFlushOnExecute, setHintString, setIsCustomQueryUsed, setIsExecutionClone, setIsNativeConnectionRequired, setIsPrepared, setIsUserDefined, setIsUserDefinedSQLCall, setJPQLString, setName, setNullableArguments, setParameterDelimiter, setPartitioningPolicy, setProperties, setProperty, setQueryMechanism, setQueryTimeout, setRedirector, setSelectionCriteria, setSession, setSessionName, setShouldBindAllParameters, setShouldBindAllParameters, setShouldCacheStatement, setShouldMaintainCache, setShouldPrepare, setShouldRetrieveBypassCache, setShouldStoreBypassCache, setShouldUseWrapperPolicy, setShouldValidateUpdateCallCacheUse, setSourceMapping, setSQLStatement, setSQLString, setTranslationRow, shouldAllowNativeSQLQuery, shouldBindAllParameters, shouldCacheStatement, shouldCascadeAllParts, shouldCascadeByMapping, shouldCascadeOnlyDependentParts, shouldCascadeParts, shouldCascadePrivateParts, shouldCloneCall, shouldIgnoreBindAllParameters, shouldIgnoreCacheStatement, shouldMaintainCache, shouldPrepare, shouldPrepare, shouldRetrieveBypassCache, shouldStoreBypassCache, shouldUseWrapperPolicy, shouldValidateUpdateCallCacheUse, storeBypassCache

 

Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

InsertObjectQuery

public InsertObjectQuery()
PUBLIC: Default constructor.

InsertObjectQuery

public InsertObjectQuery(java.lang.Object objectToInsert)
PUBLIC: Create an insert query with the object being inserted.

InsertObjectQuery

public InsertObjectQuery(Call call)
PUBLIC: Create an insert query with the custom call.

Method Detail

executeCommit

public void executeCommit()
                   throws DatabaseException
INTERNAL: Perform an insert.
Overrides:
executeCommit in class WriteObjectQuery
Throws:
DatabaseException

executeCommitWithChangeSet

public void executeCommitWithChangeSet()
                                throws DatabaseException
INTERNAL: Perform an insert.
Overrides:
executeCommitWithChangeSet in class WriteObjectQuery
Throws:
DatabaseException

getDefaultRedirector

protected QueryRedirector getDefaultRedirector()
INTERNAL: Returns the specific default redirector for this query type. There are numerous default query redirectors. See ClassDescriptor for their types.
Overrides:
getDefaultRedirector in class WriteObjectQuery

prepare

protected void prepare()
INTERNAL: Prepare the receiver for execution in a session.
Overrides:
prepare in class ObjectLevelModifyQuery

checkForCustomQuery

protected DatabaseQuery checkForCustomQuery(org.eclipse.persistence.internal.sessions.AbstractSession session,
                                            org.eclipse.persistence.internal.sessions.AbstractRecord translationRow)
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.
Overrides:
checkForCustomQuery in class DatabaseQuery

prepareCustomQuery

protected void prepareCustomQuery(DatabaseQuery customQuery)
INTERNAL: Set the properties needed to be cascaded into the custom query.
Overrides:
prepareCustomQuery in class DatabaseQuery

isInsertObjectQuery

public boolean isInsertObjectQuery()
PUBLIC: Return if this is an insert object query.
Overrides:
isInsertObjectQuery in class DatabaseQuery

Skip navigation links

Copyright © 1998, 2012, Oracle. All Rights Reserved.