Interface IndependentlyPersistableObject
-
- All Superinterfaces:
- EngineObject, IndependentObject, java.io.Serializable
- All Known Subinterfaces:
- Action, ActionConsumer, AddOn, Annotation, AsyncUpgradeQueueItem, AuditConfigurationEvent, CancelCheckoutEvent, CenteraFixedContentDevice, ChangeClassEvent, ChangeStateEvent, CheckinEvent, CheckoutEvent, ChoiceList, ClassDefinition, ClassifyCompleteEvent, ClassSubscription, ClassWorkflowSubscription, CmAbstractPersistable, CmAbstractQueueEntry, CmAbstractSequential, CmAtmosFixedContentDevice, CmAuditDispositionPolicy, CmAuditProcessingBookmark, CmBulkMoveContentJob, CmChangePreprocessorAction, CmContentMigrationPolicy, CmCustomQueueSweep, CmCustomSweepJob, CmCustomSweepPolicy, CmDatabaseConnection, CmDisposalPolicy, CmEventExportStore, CmHitachiFixedContentDevice, CmHold, CmHoldRelationship, CmIndexRequest, CmJobSweepResult, CmMarkForDeletionEvent, CmMoveContentEvent, CMODApplicationGroup, CMODFixedContentDevice, CMODRepository, CmPolicyControlledSweep, CmPolicySweepResult, CmQueueEntryClassDefinition, CmQueueSweep, CmRecoverEvent, CmRecoveryBin, CmRecoveryItem, CmRetentionUpdateJob, CmRetentionUpdatePolicy, CmSweep, CmSweepAction, CmSweepJob, CmSweepPolicy, CmSweepPolicyRelationship, CmSweepRelationship, CmSweepResult, CmTask, CmTaskRelationship, CmTextSearchAffinityGroup, CmTextSearchIndexArea, CmTextSearchIndexRequest, CmTextSearchServer, CmThumbnail, CmThumbnailGenerationJob, CmThumbnailGenerationSubscription, CmThumbnailRequest, CmThumbnailRequestSweep, CmTivoliManagementClass, CmVerityIndexRequest, CodeModule, ComponentRelationship, ContainmentRelationship, ContentCacheArea, ContentFederatingRepository, CreationEvent, CustomEvent, CustomObject, DatabaseStorageArea, DeletionEvent, DemoteVersionEvent, DITARenditionEngineConnection, Document, DocumentClassDefinition, DocumentClassificationAction, DocumentClassificationQueueItem, DocumentLifecycleAction, DocumentLifecyclePolicy, Domain, DynamicReferentialContainmentRelationship, Event, EventAction, EventClassDefinition, EventQueueItem, ExternalRepository, FileEvent, FileStorageArea, FixedContentDevice, FixedStorageArea, Folder, FreezeEvent, GenericFixedContentDevice, GetContentEvent, GetObjectEvent, IICEFixedContentDevice, ImageServicesRepository, IMFixedContentDevice, IndexArea, IndexJob, InstanceSubscription, InstanceWorkflowSubscription, IsolatedRegion, Link, LockEvent, MarkingSet, ObjectChangeEvent, ObjectStore, PEConnectionPoint, PromoteVersionEvent, PropertyTemplate, PropertyTemplateBinary, PropertyTemplateBoolean, PropertyTemplateDateTime, PropertyTemplateFloat64, PropertyTemplateId, PropertyTemplateInteger32, PropertyTemplateObject, PropertyTemplateString, PublishCompleteEvent, PublishRequest, PublishRequestEvent, PublishStyleTemplate, PublishTemplate, QueryEvent, QueueItem, ReferentialContainmentRelationship, Relationship, RenditionEngineConnection, ReplicableClassDefinition, ReplicationGroup, ReplicationJournalEntry, Repository, RetrievalEvent, SecurityPolicy, SecurityPropagationQueueItem, ServerInstance, Site, SnapLockFixedContentDevice, StorageArea, StoragePolicy, StoredSearch, SubscribableClassDefinition, Subscription, TableDefinition, TakeFederatedOwnershipEvent, TivoliFixedContentDevice, UnfileEvent, UnlockEvent, UpdateEvent, UpdateSecurityEvent, UpgradeAddOn, VerityDomainConfiguration, VerityIndexArea, VersionableClassDefinition, VersionSeries, VirtualServer, WorkflowDefinition, WorkflowEventAction, XMLPropertyMappingScript
public interface IndependentlyPersistableObject extends IndependentObject
Represents a persistableIndependentObject
that you can directly create, update, and delete.
-
-
Method Summary
Methods Modifier and Type Method and Description void
addPendingAction(PendingAction pa)
Adds the specified pending action to this object'sPendingActions
collection.void
clearPendingActions()
Clears out the list of pending actions for this object.void
delete()
Adds aDelete
pending action to this object'sPendingActions
collection.java.lang.Integer
getAccessAllowed()
Returns a value representing a bit mask of access rights granted to the user requesting this object.PendingAction[]
getPendingActions()
Returns the pending actions for this object.java.lang.Integer
getUpdateSequenceNumber()
Returns the update sequence number (USN) for this object.java.lang.Boolean
isCurrent()
Returns a value indicating whether or not the state of this object is consistent with its state in the repository.void
save(RefreshMode refreshMode)
Saves changes made to this object.void
save(RefreshMode refreshMode, PropertyFilter filter)
Saves changes made to this object.void
setUpdateSequenceNumber(java.lang.Integer val)
Sets the update sequence number (USN) for this object.-
Methods inherited from interface com.filenet.api.core.IndependentObject
fetchProperties, fetchProperties, fetchProperty, fetchProperty, getObjectReference, refresh, refresh, refresh
-
Methods inherited from interface com.filenet.api.core.EngineObject
get_ClassDescription, getClassName, getConnection, getProperties, getSuperClasses
-
-
-
-
Method Detail
-
getUpdateSequenceNumber
java.lang.Integer getUpdateSequenceNumber()
Returns the update sequence number (USN) for this object. You can use the returned value to determine if the object has been modified since some earlier fetch of the same object.An
IndependentlyPersistableObject
has an update sequence number (USN), which is an integer value on the object that protects it against concurrent updates. The USN value increases monotonically with each update to the object. When you update the object, the USN from the retrieved object is checked against the currently persisted USN value. If the values are different, the operation fails.As a special case, a USN value of
null
causes the server-side check to be skipped during updates (this is sometimes called "unprotected update"). AnIndependentlyPersistableObject
instantiated by calling one of thegetInstance
methods on aFactory
class (such asFactory.CustomObject.getInstance
) does not fetch the object from the server and so is unaware of the persisted USN. CallinggetUpdateSequence
on such an object returnsnull
.- Returns:
- An integer representing the USN.
-
setUpdateSequenceNumber
void setUpdateSequenceNumber(java.lang.Integer val)
Sets the update sequence number (USN) for this object. You can cause update sequence checking to be skipped for this object by setting the USN value tonull
.- Parameters:
val
- The new value for the USN, ornull
to suppress update sequence checking.
-
isCurrent
java.lang.Boolean isCurrent()
Returns a value indicating whether or not the state of this object is consistent with its state in the repository.When one or more of the object's properties are "dirty" (have been marked as changed since the last time they were saved),
isCurrent
returnsFalse
. You can then do one of the following:- save changes to the persistent store. (You can either call the
save
method or add the object to anUpdatingBatch
then callupdateBatch
, which effectively callssave
on eachIndependentlyPersistableObject
in the batch.) - call the object's
refresh
method to cancel the changes and restore the object's state to that of the persistent store. - remove dirty properties by calling
removeFromCache
.
- Returns:
- A
Boolean
expression representing the object state. ReturnsTrue
if the object's properties have not been changed; otherwise, returnsFalse
(the object has dirty properties).
- save changes to the persistent store. (You can either call the
-
delete
void delete()
Adds aDelete
pending action to this object'sPendingActions
collection. You must subsequently commit the change to the repository. (SeePendingAction
for more information about pending actions.)For
VersionSeries
, all document versions are deleted.For
CmRecoveryItem
, this method deletes the item contained within theCmRecoveryBin
object. It also deletes all recoverable objects represented by theCmRecoveryItem
object.
-
save
void save(RefreshMode refreshMode)
Saves changes made to this object. You can optionally refresh all of the object's properties.- Parameters:
refreshMode
- Specifies whether or not to refresh all of the object's properties.
-
save
void save(RefreshMode refreshMode, PropertyFilter filter)
Saves changes made to this object. You can optionally refresh a selected set of the object's properties using thefilter
parameter.- Parameters:
refreshMode
- Specifies whether or not to refresh all of the object's properties.filter
- APropertyFilter
object that represents information for controlling which property values (and with what level of detail and recursion) to refresh. Specifyingnull
is the same as callingsave(refreshMode)
.
-
getPendingActions
PendingAction[] getPendingActions()
Returns the pending actions for this object.- Returns:
- An array of
PendingAction
objects.
-
addPendingAction
void addPendingAction(PendingAction pa)
Adds the specified pending action to this object'sPendingActions
collection. (Note that you probably won't directly manipulate an object's pending actions in this manner. You will more likely call wrapper methods such asdelete
andcheckin
, which add a pending action to the collection.)- Parameters:
pa
- APendingAction
object.
-
clearPendingActions
void clearPendingActions()
Clears out the list of pending actions for this object. For example, if you calleddelete()
without subsequently callingsave
, then calledclearPendingActions()
, theDelete
pending action would no longer be in the object's pending actions list. This effectively cancels changes not yet saved.
-
getAccessAllowed
java.lang.Integer getAccessAllowed()
Returns a value representing a bit mask of access rights granted to the user requesting this object.- Returns:
- An integer representing the access rights granted to the requesting user.
-
-