com.filenet.api.core

Interface IndependentlyPersistableObject

    • 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:

        • save changes to the persistent store. (You can either call the save method or add the object to an UpdatingBatch then call updateBatch, which effectively calls save on each IndependentlyPersistableObject 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. 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.)

        For VersionSeries, all document versions are deleted.

        For CmRecoveryItem, this method deletes the item contained within the CmRecoveryBin object. It also deletes all recoverable objects represented by the CmRecoveryItem 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 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, 2013. All rights reserved.