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 theupdateBatch
method to commit the operation. The entire batch operation is executed within a single transaction.- See Also:
BatchItemHandle
,RetrievingBatch
-
-
Method Summary
Methods Modifier and Type Method and Description BatchItemHandle
add(IndependentlyPersistableObject object, PropertyFilter filter)
Adds an item to the batch to be updated by this instance.static UpdatingBatch
createUpdatingBatchInstance(Domain domain, RefreshMode refresh)
Creates a newUpdatingBatch
instance for the specified FileNet P8 domain.boolean
hasPendingExecute()
Indicates whether there are any pending items to update in this batch.void
updateBatch()
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 newUpdatingBatch
instance for the specified FileNet P8 domain.- Parameters:
domain
- ADomain
object representing the FileNet P8 domain to use as the scope of thisUpdatingBatch
instance.refresh
- ARefreshMode
object indicating whether theUpdatingBatch
object returned is to contain refreshed data from the server.- Returns:
- The
UpdatingBatch
object 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 aBatchItemHandle
instance, and the batch is a list ofBatchItemHandle
instances.- Parameters:
object
- AnIndependentlyPersistableObject
instance for the persisted object to update.filter
- APropertyFilter
object 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 (PropertyEngineObject
properties with a state ofPropertyState.UNEVALUATED
orPropertyState.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
BatchItemHandle
instance 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
boolean
value 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.
-
-