Oracle TopLink API Reference
10g Release 3 (10.1.3)

B13698-01


oracle.toplink.queryframework
Class UpdateAllQuery

java.lang.Object
  extended byoracle.toplink.queryframework.DatabaseQuery
      extended byoracle.toplink.queryframework.ModifyQuery
          extended byoracle.toplink.queryframework.UpdateAllQuery

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

public class UpdateAllQuery
extends ModifyQuery

PUBLIC: Query used to perform a bulk update using TopLink's expression framework.

See Also:
Serialized Form

Field Summary
static int INVALIDATE_CACHE
           
static int NO_CACHE
          Cache usage flags

 

Fields inherited from class oracle.toplink.queryframework.DatabaseQuery
CascadeAggregateDelete, CascadeAllParts, CascadeByMapping, CascadeDependentParts, CascadePrivateParts, NoCascading

 

Constructor Summary
UpdateAllQuery()
          PUBLIC:
UpdateAllQuery(java.lang.Class referenceClass)
          PUBLIC: Create a new update all query for the class specified.
UpdateAllQuery(java.lang.Class referenceClass, Expression selectionCriteria)
          PUBLIC: Create a new update all query for the class and the selection criteria specified.
UpdateAllQuery(java.lang.Class referenceClass, ExpressionBuilder builder)
          PUBLIC: Create a new update all query for the class specified.

 

Method Summary
 void addUpdate(Expression field, Expression value)
          PUBLIC: Add the update (SET) clause to the query.
 void addUpdate(Expression field, java.lang.Object value)
          PUBLIC: Add the update (SET) clause to the query.
 void addUpdate(java.lang.String attributeName, java.lang.Object value)
          PUBLIC: Add the update (SET) clause to the query.
 int getCacheUsage()
          PUBLIC: Return the cache usage for this query.
 ExpressionBuilder getExpressionBuilder()
          PUBLIC: Get the expression builder which should be used for this query.
 java.lang.Class getReferenceClass()
          PUBLIC: Return the reference class for this query.
 void setCacheUsage(int cacheUsage)
          PUBLIC: Set the level of cache support for this query, either NONE or INVALIDATE.
 void setExpressionBuilder(ExpressionBuilder builder)
          PUBLIC: Set the expression builder which should be used for this query.
 void setReferenceClass(java.lang.Class referenceClass)
          PUBLIC: Set the reference class this query.
 void setShouldDeferExecutionInUOW(boolean shouldDeferExecutionInUOW)
          PUBLIC: Set a flag indicating whether execution should be deferred in UOW until commit.
 boolean shouldDeferExecutionInUOW()
          PUBLIC: Indicates whether execution should be deferred in UOW until commit.

 

Methods inherited from class oracle.toplink.queryframework.ModifyQuery
forceBatchStatementExecution, isModifyQuery, setForceBatchStatementExecution

 

Methods inherited from class oracle.toplink.queryframework.DatabaseQuery
addArgument, addArgument, addArgument, addArgumentValue, addArgumentValues, addCall, addStatement, bindAllParameters, cacheStatement, cascadeAllParts, cascadeByMapping, cascadePrivateParts, dontBindAllParameters, dontCacheStatement, dontCascadeParts, dontMaintainCache, getCall, getCalls, getDatasourceCall, getDatasourceCalls, getEJBQLString, getHintString, getName, getQueryTimeout, getRedirector, getSelectionCriteria, getSessionName, getSQLStatement, getSQLString, getSQLStrings, getTranslatedSQLString, getTranslatedSQLStrings, hasSessionName, ignoreBindAllParameters, ignoreCacheStatement, isCallQuery, isDataModifyQuery, isDataReadQuery, isDeleteObjectQuery, isExpressionQuery, isInsertObjectQuery, isObjectLevelModifyQuery, isObjectLevelReadQuery, isReadAllQuery, isReadObjectQuery, isReadQuery, isReportQuery, isSQLCallQuery, isUpdateObjectQuery, isWriteObjectQuery, maintainCache, prepareCall, setCall, setDatasourceCall, setEJBQLString, setHintString, setName, setQueryTimeout, setRedirector, setSelectionCriteria, setSessionName, setShouldBindAllParameters, setShouldCacheStatement, setShouldMaintainCache, setShouldPrepare, setShouldUseWrapperPolicy, setSQLStatement, setSQLString, shouldBindAllParameters, shouldCacheStatement, shouldCascadeAllParts, shouldCascadeByMapping, shouldCascadeParts, shouldCascadePrivateParts, shouldIgnoreBindAllParameters, shouldIgnoreCacheStatement, shouldMaintainCache, shouldPrepare, shouldUseWrapperPolicy, toString

 

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

 

Field Detail

NO_CACHE

public static final int NO_CACHE
Cache usage flags
See Also:
Constant Field Values

INVALIDATE_CACHE

public static final int INVALIDATE_CACHE
See Also:
Constant Field Values

Constructor Detail

UpdateAllQuery

public UpdateAllQuery()
PUBLIC:

UpdateAllQuery

public UpdateAllQuery(java.lang.Class referenceClass)
PUBLIC: Create a new update all query for the class specified.

UpdateAllQuery

public UpdateAllQuery(java.lang.Class referenceClass,
                      Expression selectionCriteria)
PUBLIC: Create a new update all query for the class and the selection criteria specified.

UpdateAllQuery

public UpdateAllQuery(java.lang.Class referenceClass,
                      ExpressionBuilder builder)
PUBLIC: Create a new update all query for the class specified. The expression builder must be used for all associated expressions used with the query.

Method Detail

addUpdate

public void addUpdate(Expression field,
                      java.lang.Object value)
PUBLIC: Add the update (SET) clause to the query. Use the default expression builder.

addUpdate

public void addUpdate(java.lang.String attributeName,
                      java.lang.Object value)
PUBLIC: Add the update (SET) clause to the query. Use the default expression builder.

addUpdate

public void addUpdate(Expression field,
                      Expression value)
PUBLIC: Add the update (SET) clause to the query. Ensure the builder has the session and query class set.

getCacheUsage

public int getCacheUsage()
PUBLIC: Return the cache usage for this query.

getExpressionBuilder

public ExpressionBuilder getExpressionBuilder()
PUBLIC: Get the expression builder which should be used for this query. This expression builder should be used to build all expressions used by this query.

getReferenceClass

public java.lang.Class getReferenceClass()
PUBLIC: Return the reference class for this query.
Overrides:
getReferenceClass in class DatabaseQuery

setCacheUsage

public void setCacheUsage(int cacheUsage)
PUBLIC: Set the level of cache support for this query, either NONE or INVALIDATE.

setExpressionBuilder

public void setExpressionBuilder(ExpressionBuilder builder)
PUBLIC: Set the expression builder which should be used for this query. This expression builder should be used to build all expressions used by this query.

setReferenceClass

public void setReferenceClass(java.lang.Class referenceClass)
PUBLIC: Set the reference class this query.

setShouldDeferExecutionInUOW

public void setShouldDeferExecutionInUOW(boolean shouldDeferExecutionInUOW)
PUBLIC: Set a flag indicating whether execution should be deferred in UOW until commit.

shouldDeferExecutionInUOW

public boolean shouldDeferExecutionInUOW()
PUBLIC: Indicates whether execution should be deferred in UOW until commit.

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