com.filenet.api.core
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, CMODApplicationGroup, CMODFixedContentDevice, CMODRepository, 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, SubscribableClassDefinition, Subscription, TableDefinition, TakeFederatedOwnershipEvent, UnfileEvent, UnlockEvent, UpdateEvent, UpdateSecurityEvent, UpgradeAddOn, VerityDomainConfiguration, VerityIndexArea, VersionableClassDefinition, VersionSeries, VirtualServer, WorkflowDefinition, WorkflowEventAction, XMLPropertyMappingScript

public interface IndependentlyPersistableObject
extends IndependentObject

Represents a persistable IndependentObject that you can directly create, update, and delete.


Method Summary
 void addPendingAction(PendingAction pa)
          Adds the specified pending action to this object's PendingActions collection.
 void clearPendingActions()
          Clears out the list of pending actions for this object.
 void delete()
          Adds a Delete pending action to this object's PendingActions 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"). An IndependentlyPersistableObject instantiated by calling one of the getInstance methods on a Factory class (such as Factory.CustomObject.getInstance) does not fetch the object from the server and so is unaware of the persisted USN. Calling getUpdateSequence on such an object returns null.

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 to null.

Parameters:
val - The new value for the USN, or null 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 returns False. You can then do one of the following:

Returns:
A Boolean expression representing the object state. Returns True if the object's properties have not been changed; otherwise, returns False (the object has dirty properties).

delete

void delete()
Adds a Delete pending action to this object's PendingActions collection. You must subsequently commit the change to the repository. (See PendingAction for more information about pending actions.)


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 the filter parameter.

Parameters:
refreshMode - Specifies whether or not to refresh all of the object's properties.
filter - A PropertyFilter object that represents information for controlling which property values (and with what level of detail and recursion) to refresh. Specifying null is the same as calling save(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's PendingActions 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 as delete and checkin, which add a pending action to the collection.)

Parameters:
pa - A PendingAction object.

clearPendingActions

void clearPendingActions()
Clears out the list of pending actions for this object. For example, if you called delete() without subsequently calling save, then called clearPendingActions(), the Delete 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.


© Copyright IBM Corporation 2006, 2008. All rights reserved.