Interface IDfPersistentObject

All Superinterfaces:
IDfTypedObject
All Known Subinterfaces:
IDfACL, IDfAcsConfig, IDfActivity, IDfAliasSet, IDfAspectRelation, IDfAssembly, IDfAuditTrail, IDfBocsConfig, IDfContainment, IDfContentTransferConfig, IDfDmsConfig, IDfDocument, IDfDumpRecord, IDfFolder, IDfForeignKey, IDfFormat, IDfGroup, IDfLoadRecord, IDfLocation, IDfMethodObject, IDfMountPoint, IDfNote, IDfPackage, IDfPlugin, IDfPolicy, IDfProcess, IDfQueueItem, IDfRelation, IDfRelationType, IDfRetainer, IDfRouter, IDfSearchResults, IDfSmartList, IDfStateExtension, IDfSysObject, IDfSysObjectStream, IDfType, IDfUser, IDfValidationDescriptor, IDfWorkflow, IDfWorkflowAttachment, IDfWorkitem, com.documentum.fc.client.internal.IPersistentObjectInternal

public interface IDfPersistentObject extends IDfTypedObject
A Documentum object that has typed attributes and is persisted in a repository.
  • Field Details

    • CURRENCY_CHECK_ALWAYS

      static final String CURRENCY_CHECK_ALWAYS
      Currency check value to always check if the object is current.
      See Also:
    • CURRENCY_CHECK_NEVER

      static final String CURRENCY_CHECK_NEVER
      Currency check value to never check if the object is current.
      See Also:
    • CURRENCY_CHECK_FIRST_ACCESS

      static final String CURRENCY_CHECK_FIRST_ACCESS
      Currency check value to only check currency for the first access.
      See Also:
    • CURRENCY_CHECK_ONCE_PER_SCOPE

      static final String CURRENCY_CHECK_ONCE_PER_SCOPE
      Currency check value to only check currency once per currency scope.
      See Also:
  • Method Details

    • isDeleted

      boolean isDeleted() throws DfException
      Returns true if this object has been deleted during this session. This method will not return true if the object was deleted on another session or by another user. In addition, if this method is called on a Sysobject and that object is the root version of a version tree, deleting this object sets this attribute to true.
      Throws:
      DfException - if server error occurs
    • isDirty

      boolean isDirty() throws DfException
      Indicates whether unsaved changes have been made to this object.
      Returns:
      true if unsaved changes have been made to the object; false if not
      Throws:
      DfException - if server error occurs
    • isNew

      boolean isNew() throws DfException
      Indicates whether this object was created during the current session but has not yet been saved.
      Returns:
      true if the object was created during the current session but has not yet been saved. false if the object was created during the current session and saved, or if it was not created during the current session.
      Throws:
      DfException - if a server error occurs
    • isReplica

      boolean isReplica() throws DfException
      Indicates whether an object is a replica.
      Throws:
      DfException - if a server error occurs
    • getType

      IDfType getType() throws DfException
      Provides an IDfType interface representing the type of this object.
      Returns:
      An IDfType interface to the object
      Throws:
      DfException - if a server error occurs
    • isInstanceOf

      boolean isInstanceOf(String typeName) throws DfException
      Indicates if this is an object of the given type or of a type derived from the given type.
      Parameters:
      typeName - a type name
      Returns:
      an indication of whether this is an object of the given type or of a type derived from the given type.
      Throws:
      DfException - if a server error occurs
    • getVStamp

      int getVStamp() throws DfException
      Returns the version stamp for this object.

      The version stamp is an integer that represents the number of committed transactions that have modified an object. Use this method to verify that your current copy of an object is the most recent available.

      Throws:
      DfException - if a server error occurs
    • getValidator

      IDfValidator getValidator() throws DfException
      Returns the IDfValidator interface that is assocated with this persistent object instance (the IDfValidator shall provide validation-related services). Note that attribute level validation results could vary depending on the attribute values of depending attributes. Refer to the DQL Reference Manual for more information about setting type and attribute level modifiers.

      The following code example demonstrates how to perform both object level and attribute level validation:


           IDfId objId = new DfId("0900d5bb8001f900");
           IDfPersistentObject perObj = sess.getObject(objId);
           IDfValidator validator = perObj.getValidator();
           validator.validateAll(null, false);
       

      Returns:
      the IDfValidator interface that is assocated with this persistent object instance.
      Throws:
      DfException
    • fetch

      boolean fetch(String typeNameIgnored) throws DfException
      Fetches this object from the repository without placing a lock on the object.

      Use this method to ensure that you are working with the most recent version of the object. You must have at least BROWSE permission on an object to call the fetch method.

      Without a lock, there is no guarantee that you will be able to save any changes you make to the object since another user may checkout the object while you have it fetched. If you fetch an object, you cannot use the checkin method to write the object back to the repository. You must use the save method.

      Parameters:
      typeNameIgnored - The type name argument is ignored because the type name was set or determined at creation of the DfPersistentObject and is therefore already known. Overriding the value here would just cause an error. The parameter still exists for backward compatability, but should be specified as null.
      Throws:
      DfException - if a server error occurs
      See Also:
    • fetchWithCaching

      boolean fetchWithCaching(String currencyCheckValue, boolean usePersistentCache, boolean useSharedCache) throws DfException
      Fetches this object from the repository without placing a lock on the object.

      This form of fetch() includes additional parameters for specifying caching options such as consistency and sharing. If the target object is cached persistently then these options control use of the cache and how often data is refreshed from the server.

      Parameters:
      currencyCheckValue - specifies that the object should be persistently cached and indicates how often the object needs to checked for consistency with the server. If the value is numeric it indicates the time (in seconds) which the caller is willing to allow the object to be used without being rechecked for consistency. If the requested object is found in the cache and has not been checked for consistency in the specified time period then it is checked and re-fetched from the server if necessary. If the value is non-numeric then it specifies a cache configuration object which defines the consistency check rules. Specify null if you don't want the object persistently cached.
      usePersistentCache - set to true if want the object the object cached persistently
      useSharedCache - Reserved for future use.
      Returns:
      true if the method discovered a newer version of the object on the server. In such cases, all unsaved changes that you have made to the object are lost. false if the method did not discover a newer version of the object on the server.
      Throws:
      DfException - if a server error occurs
      See Also:
    • save

      void save() throws DfException
      Saves an object to a Documentum server.

      You must have WRITE permission on an object to call the save method.

      The save is generally used to save a newly created object in a Documentum server. You can also use it when you want to save changes to an object without creating a new version. This method overwrites the previously saved version with the local copy of the object.

      This method might fail if you fetched the object from a Documentum server rather than checked it out. Fetching an object does not place a lock on the object, and other users may have checked out or fetched and saved the object while you were working on it.

      Note that you cannot save a load record object while an explicit transaction is open.

      The following code example demonstrates how to save an object:


          IDfSysObject sysObj = session.newObject("dm_document");
          sysObj.setContentType("wp7");
          sysObj.setFile("chap_1_wp7");
          sysObj.save();
       

      Throws:
      DfException - if a server error occurs
    • revert

      void revert() throws DfException
      Discards any changes to an object that have not been saved to a repository.
      Throws:
      DfException - if a server error occurs
    • destroy

      void destroy() throws DfException
      Removes the object from the Documentum server.

      This method does not destroy multiple versions of an object, only the object pertaining to the instantiated persistent object.

      The following code example demonstrates how to destroy a single object:


           IDfPersistentObject perObj = sess.getObject(new DfId("0900d5bb8001f900"));
           perObj.destroy();
       

      Throws:
      DfException - if a server error occurs,
      See Also:
    • lock

      void lock() throws DfException
      Acquires a low-level repository database lock on the object. Do not use this method within a transaction. Use the method lockEx(true) within a transaction instead.
      Throws:
      DfException
    • lockEx

      void lockEx(boolean validateStamp) throws DfException
      Acquires a low-level repository database lock on the object. If the validateStamp parameter is true, perform a currency check and throw and fail with a DfException if this object is not up to date with the repository.Use this method, and set the validateStamp to true, when acquiring a lock within a transaction.
      Parameters:
      validateStamp -
      Throws:
      DfException
    • signoff

      void signoff(String user, String os_password, String reason) throws DfException
      Creates an audit trail entry of signoff information for an object.
      Parameters:
      user - identifies the signer. Specify the user_os_name.
      os_password - specifies the user’s operating system password.
      reason - describes the purpose for which the signature is issued.
      Throws:
      DfException - if server error occurs
    • addChildRelative

      IDfRelation addChildRelative(String relationTypeName, IDfId childId, String childLabel, boolean isPermanent, String description) throws DfException
      Creates a Relation object. This method should be invoked on the parent object to add a child in the relation.
      Parameters:
      relationTypeName - the name of a valid relation type
      childId - child of this Relation
      childLabel - version string of the child. If this is null, the relation will contain no child label.
      isPermanent - is the link permanent.
      description - a user-friendly description for the relation object. If null, the relation object will not have a description.
      Throws:
      DfException - if a server error occurs
    • addParentRelative

      IDfRelation addParentRelative(String relationTypeName, IDfId parentId, String childLabel, boolean isPermanent, String description) throws DfException
      Creates a Relation object. This method should be invoked on the child object to add a parent in the Relation.
      Parameters:
      relationTypeName - the name of a valid relation type
      parentId - parent of this child
      childLabel - version string of the child. If this is null, the relation will contain no child label.
      isPermanent - is the link permanent.
      description - a user-friendly description for the relation object. If null, the relation object will not have a description.
      Throws:
      DfException - if a server error occurs
      See Also:
    • getChildRelatives

      IDfCollection getChildRelatives(String relationTypeName) throws DfException
      Returns a collection of IDfRelation objects where parent is this object, and the relation_name matches the value passed in as a parameter.
      Parameters:
      relationTypeName - name of the relation type
      Throws:
      DfException - if a server error occurs
    • getParentRelatives

      IDfCollection getParentRelatives(String relationTypeName) throws DfException
      Returns a collection of IDfRelation objects where child is this object, and the relation_name matches the value passed in as a parameter.
      Parameters:
      relationTypeName - name of the relation type
      Throws:
      DfException - if a server error occurs
    • removeChildRelative

      void removeChildRelative(String relationTypeName, IDfId childId, String childLabel) throws DfException
      This method should be invoked on the parent object to abandon its relationship with one or more children.

      Ths method removes all Relation objects where the parent is this object and the child_id, child_label and relation_name have the values passed in as parameters. You can make the query more generic by passing null as the value for either childId, or childLabel, or both. For example, if both childId and childLabel are null, all relation objects where the relation type is relationTypeName and the parent is this object will be removed.

      Parameters:
      relationTypeName - - name of the relation.
      childId - - child of this object.
      childLabel - - version string of the child.
      Throws:
      DfException - if a server error occurs
    • removeParentRelative

      void removeParentRelative(String relationTypeName, IDfId parentId, String childLabel) throws DfException
      This method should be invoked on the child object to abandon its relationship with one or more parents.

      This method removes all relation objects where the child is this object and the parentId, child_label and relation_name have the values passed in as parameters.

      You can make the query more generic by passing null as the value for either parentId, or childLabel, or both. For example, if both parentId and childLabel are null, all relation objects where the relation type is relationTypeName and this object is the child and where the child label equalschildLabel, will be deleted.

      Parameters:
      relationTypeName - name of the relation.
      parentId - parent of this object.
      childLabel - version string of the child.
      Throws:
      DfException - if a server error occurs
    • apiGet

      String apiGet(String cmd, String args) throws DfException
      Deprecated.
      DMCL passthrough should not be used anymore
      Provides a pass-through for DMCL dmAPIGet calls.

      Application developers are encouraged to write to the DFC since all functionality in the server APIs can be accessed through these classes. Since apiGet automatically inserts the session ID and object ID into calls made to this method, do not add these two arguments to server API calls that require them. For example, if you are passing the get server API to the DFC, you would write the following code:

      mypersistobj.apiGet('get', 'object_name')

      instead of writing

      dmAPIGet('get,c,090007d080001234,object_name')

      where 090007d080001234 is the object ID of mypersistobj.

      Parameters:
      cmd - the server API
      args - the arguments for the API specified in cmd. (This does not include the session ID or object ID.) Refer to the API Reference Manual for more information about arguments for server APIs.
      Returns:
      the value returned by the API specified in cmd; Refer to the Server Reference Manual for more information about the return values for server APIs.
      Throws:
      DfException - if the dmAPISet server API failed, or the current session has timed out and cannot be re-established
      See Also:
    • apiSet

      boolean apiSet(String cmd, String args, String value) throws DfException
      Deprecated.
      DMCL passthrough should not be used anymore
      Provides a pass-through for DMCL dmAPISet calls.

      Application developers are encouraged to write to the DFC since all functionality in the server APIs can be accessed through these classes. Since apiSet automatically inserts the session ID and object ID into calls made to this method, do not add these two arguments to server API calls that require them. For example, if you are passing the set server API to the DFC, you would write the following code:

      mypersistobj.apiSet('set', 'object_name, my_name')

      instead of writing

      dmAPISet('set,c,090007d080001234,object_name,my_name')

      where 090007d080001234 is the object ID of mypersistobj.

      Parameters:
      cmd - the server API
      args - the arguments for the API specified in cmd; Refer to the Server Reference Manual for more information about arguments for server APIs.
      value - the value that you want to assign to the attribute
      Returns:
      true is always returned.
      Throws:
      DfException - if the dmAPISet server API failed, or the current session has timed out and cannot be reestablished
      See Also:
    • apiExec

      boolean apiExec(String cmd, String args) throws DfException
      Deprecated.
      DMCL passthrough should not be used anymore
      Provides a pass-through for DMCL dmAPIExec calls.

      Application developers are encouraged to write to the DFC since all functionality in the server APIs can be accessed through these classes.

      Refer to the Server Reference Manual for more information about DMCL server APIs.

      Parameters:
      cmd - the server API
      args - the arguments for the API specified in cmd (this does not include the session ID or the object ID).
      Returns:
      true is always returned.
      Throws:
      DfException - if the dmAPISet server API failed, or the current session has timed out and cannot be reestablished
      See Also:
    • getAttrAssistance

      IDfList getAttrAssistance(String attrName) throws DfException
      Deprecated.
      use getValidator and then call getValueAssistance on IDfValidator instead
      Returns the legal values associated with an attribute that a user can choose among.
      Parameters:
      attrName - the attribute to get the value assistance for
      Throws:
      DfException
    • getAttrAssistanceWithValues

      IDfList getAttrAssistanceWithValues(String attrName, IDfList depAttrNameList, IDfList depAttrValueListList) throws DfException
      Deprecated.
      use getValidator and then call getValueAssistance on IDfValidator instead
      Lists all legal values for an attribute.
      Throws:
      DfException - if a server error occurs
    • getAttrAsstDependencies

      IDfList getAttrAsstDependencies(String attrName) throws DfException
      Deprecated.
      use getValidator and then call getValueAssistanceDependencies on IDfValidator instead
      It returns the list of attributes on which the rule is depend on.
      Parameters:
      attrName - the attribute to get the dependencies for
      Throws:
      DfException
    • getWidgetType

      String getWidgetType(int environment, String attrName) throws DfException
      Deprecated.
      use getValidator and then call getWidgetType on IDfValidator instead
      Look up the appropriate widget type to use, given specific developement environment and attribute name. If in Java environment, Class name will be returned. If in Visual Basic / Visual C++ environment, a CLSID will be returned.
      Throws:
      DfException
    • validateAllRules

      void validateAllRules(int stopAfterNumOfErrors) throws DfException
      Deprecated.
      use getValidator and then call validateAll on IDfValidator instead
      ValidateAllRules() will perform both attribute level and object level validation on a DfSysObject. Attribute level validation will be performed on attributes that are modified but not yet validated (eg, by an explicit call to validateAttrRules(attrName)).
      Parameters:
      stopAfterNumOfErrors - specified the maximum number of validation rules violation validateAllRules() will detect. If "stopAfterNumOfErrors" is set to zero, validateAllRules() will not stop until it completes all the validation rules.
      Throws:
      DfException
    • validateAttrRules

      void validateAttrRules(String attrName, int stopAfterNumOfErrors) throws DfException
      Deprecated.
      use getValidator and then call validateAttrRules on IDfValidator instead
      It validates the attribute value input from the user (data retrieved from this SysObject).
      Parameters:
      stopAfterNumOfErrors - specified the maximum number of validation rules violation validateAllRules() will detect. If "stopAfterNumOfErrors" is set to zero, validateAllRules() will not stop until it completes all the validation rules.
      Throws:
      DfException
    • validateAttrRulesWithValue

      void validateAttrRulesWithValue(String attrName, String value, int stopAfterNumOfErrors) throws DfException
      Deprecated.
      use getValidator and then call validateAttrRules on IDfValidator instead
      It validates an attribute value input as String from the user.
      Parameters:
      stopAfterNumOfErrors - specified the maximum number of validation rules violation validateAllRules() will detect. If "stopAfterNumOfErrors" is set to zero, validateAllRules() will not stop until it completes all the validation rules.
      Throws:
      DfException
    • validateAttrRulesWithValues

      void validateAttrRulesWithValues(String attrName, IDfList valueList, int stopAfterNumOfErrors) throws DfException
      Deprecated.
      use getValidator and then call validateAttrRules on IDfValidator instead
      It validates the list of attribute value input from the user.
      Parameters:
      stopAfterNumOfErrors - specified the maximum number of validation rules violation validateAllRules() will detect. If "stopAfterNumOfErrors" is set to zero, validateAllRules() will not stop until it completes all the validation rules.
      Throws:
      DfException
    • validateObjRules

      void validateObjRules(int stopAfterNumOfErrors) throws DfException
      Deprecated.
      use getValidator and then call validateAllObjRules on IDfValidator instead
      Validates at the object level. If any of the object level rules is violated, a DfException will be thrown.
      Parameters:
      stopAfterNumOfErrors - specified the maximum number of validation rules violation validateAllRules() will detect. If "stopAfterNumOfErrors" is set to zero, validateAllRules() will not stop until it completes all the validation rules.
      Throws:
      DfException
    • validateObjRulesWithValues

      void validateObjRulesWithValues(IDfList attrNameList, IDfList valueListList, int stopAfterNumOfErrors) throws DfException
      Deprecated.
      use getValidator and then call validateAllObjRules on IDfValidator instead
      It validates this SysObject at the object level using the attribute value list. If any of the object level rules is violated, a DfException will be thrown.
      Parameters:
      stopAfterNumOfErrors - specified the maximum number of validation rules violation validateAllRules() will detect. If "stopAfterNumOfErrors" is set to zero, validateAllRules() will not stop until it completes all the validation rules.
      Throws:
      DfException
    • setPartition

      void setPartition(int partition) throws DfException
      Set i_partition for this object.

      i_partition is an integer that represents partition id that has been set for an object. Use this method to update the i_partition attribute of an object.

      Throws:
      DfException - if a server error occurs
    • getPartition

      int getPartition() throws DfException
      Returns i_partition for this object.

      i_partition is an integer that represents partition id that has been set for an object. Use this method to retrieve the i_partition attribute of an object.

      Throws:
      DfException - if a server error occurs
    • registerEvent

      void registerEvent(String message, String event, int priority, boolean sendMail) throws DfException
      Registers the current user to receive notifications when the specified event occurs on the specified object.
      Parameters:
      message - Defines a message sent to the user receiving the event notification.
      event - Defines the event for which you want to receive notification.
      priority - Defines a priority level for the event. Use an integer number for this argument.
      sendMail - Directs the server to send electronic mail to the user whenever an event is placed on the user's queue.
      Throws:
      DfException - if a server error occurs.
    • unRegisterEvent

      void unRegisterEvent(String event) throws DfException
      Removes the current user's registration for a specified event.
      Parameters:
      event - Identifies the event whose registration you want to cancel.
      Throws:
      DfException - if a server error occurs.
    • unRegisterEventEx

      void unRegisterEventEx(String event, String userName) throws DfException
      Removes the current user's registration for a specified event.
      Parameters:
      event - Identifies the event whose registration you want to cancel.
      userName - User who initially registered the event. This is used by a user with SysAdmin or SuperUser privilege to unregister an event previously registered by another user.
      Throws:
      DfException - if a server error occurs.