com.filenet.api.core
Class UpdatingBatch
- java.lang.Object
-
- com.filenet.api.core.Batch
-
- com.filenet.api.core.UpdatingBatch
-
public class UpdatingBatch extends Batch
Creates a batch operation to update persisted objects. Once created, the batch operation is pending until you call theupdateBatchmethod to commit the operation. The entire batch operation is executed within a single transaction.- See Also:
BatchItemHandle,RetrievingBatch
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description BatchItemHandleadd(IndependentlyPersistableObject object, PropertyFilter filter)Adds an item to the batch to be updated by this instance.static UpdatingBatchcreateUpdatingBatchInstance(Domain domain, RefreshMode refresh)Creates a newUpdatingBatchinstance for the specified FileNet P8 domain.booleanhasPendingExecute()Indicates whether there are any pending items to update in this batch.voidupdateBatch()Update all of the items in this batch.-
Methods inherited from class com.filenet.api.core.Batch
getBatchItemHandles
-
-
-
-
Method Detail
-
createUpdatingBatchInstance
public static UpdatingBatch createUpdatingBatchInstance(Domain domain, RefreshMode refresh)
Creates a newUpdatingBatchinstance for the specified FileNet P8 domain.- Parameters:
domain- ADomainobject representing the FileNet P8 domain to use as the scope of thisUpdatingBatchinstance.refresh- ARefreshModeobject indicating whether theUpdatingBatchobject returned is to contain refreshed data from the server.- Returns:
- The
UpdatingBatchobject created.
-
add
public BatchItemHandle add(IndependentlyPersistableObject object, PropertyFilter filter)
Adds an item to the batch to be updated by this instance. The item is referenced by aBatchItemHandleinstance, and the batch is a list ofBatchItemHandleinstances.- Parameters:
object- AnIndependentlyPersistableObjectinstance for the persisted object to update.filter- APropertyFilterobject that represents information for controlling which property values (and with what level of detail and recursion) to return. Ifnull, this method returns values for all non-object properties and returns placeholders for all object-valued properties (PropertyEngineObjectproperties with a state ofPropertyState.UNEVALUATEDorPropertyState.REFERENCE); any subsequent attempts to access an object-valued property will cause an automatic round-trip to the server to fetch its value.- Returns:
- A
BatchItemHandleinstance representing the object added to the batch.
-
hasPendingExecute
public boolean hasPendingExecute()
Indicates whether there are any pending items to update in this batch.- Returns:
- A
booleanvalue of true if one or more items is pending in this batch; false otherwise.
-
updateBatch
public void updateBatch()
Update all of the items in this batch. Calling this method commits the pending batch update operation. The batch operation is executed within a single transaction.- Throws:
EngineRuntimeException- Thrown when there are no pending items in the batch.
-
-