Package com.documentum.fc.client
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
A Documentum object that has typed attributes and is persisted in a repository.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Currency check value to always check if the object is current.static final String
Currency check value to only check currency for the first access.static final String
Currency check value to never check if the object is current.static final String
Currency check value to only check currency once per currency scope. -
Method Summary
Modifier and TypeMethodDescriptionaddChildRelative
(String relationTypeName, IDfId childId, String childLabel, boolean isPermanent, String description) Creates a Relation object.addParentRelative
(String relationTypeName, IDfId parentId, String childLabel, boolean isPermanent, String description) Creates a Relation object.boolean
Deprecated.DMCL passthrough should not be used anymoreDeprecated.DMCL passthrough should not be used anymoreboolean
Deprecated.DMCL passthrough should not be used anymorevoid
destroy()
Removes the object from the Documentum server.boolean
Fetches this object from the repository without placing a lock on the object.boolean
fetchWithCaching
(String currencyCheckValue, boolean usePersistentCache, boolean useSharedCache) Fetches this object from the repository without placing a lock on the object.getAttrAssistance
(String attrName) Deprecated.use getValidator and then call getValueAssistance on IDfValidator insteadgetAttrAssistanceWithValues
(String attrName, IDfList depAttrNameList, IDfList depAttrValueListList) Deprecated.use getValidator and then call getValueAssistance on IDfValidator insteadgetAttrAsstDependencies
(String attrName) Deprecated.use getValidator and then call getValueAssistanceDependencies on IDfValidator insteadgetChildRelatives
(String relationTypeName) Returns a collection of IDfRelation objects where parent is this object, and the relation_name matches the value passed in as a parameter.getParentRelatives
(String relationTypeName) Returns a collection of IDfRelation objects where child is this object, and the relation_name matches the value passed in as a parameter.int
Returns i_partition for this object.getType()
Provides an IDfType interface representing the type of this object.Returns the IDfValidator interface that is assocated with this persistent object instance (the IDfValidator shall provide validation-related services).int
Returns the version stamp for this object.getWidgetType
(int environment, String attrName) Deprecated.use getValidator and then call getWidgetType on IDfValidator insteadboolean
Returnstrue
if this object has been deleted during this session.boolean
isDirty()
Indicates whether unsaved changes have been made to this object.boolean
isInstanceOf
(String typeName) Indicates if this is an object of the given type or of a type derived from the given type.boolean
isNew()
Indicates whether this object was created during the current session but has not yet been saved.boolean
Indicates whether an object is a replica.void
lock()
Acquires a low-level repository database lock on the object.void
lockEx
(boolean validateStamp) Acquires a low-level repository database lock on the object.void
registerEvent
(String message, String event, int priority, boolean sendMail) Registers the current user to receive notifications when the specified event occurs on the specified object.void
removeChildRelative
(String relationTypeName, IDfId childId, String childLabel) This method should be invoked on the parent object to abandon its relationship with one or more children.void
removeParentRelative
(String relationTypeName, IDfId parentId, String childLabel) This method should be invoked on the child object to abandon its relationship with one or more parents.void
revert()
Discards any changes to an object that have not been saved to a repository.void
save()
Saves an object to a Documentum server.void
setPartition
(int partition) Set i_partition for this object.void
Creates an audit trail entry of signoff information for an object.void
unRegisterEvent
(String event) Removes the current user's registration for a specified event.void
unRegisterEventEx
(String event, String userName) Removes the current user's registration for a specified event.void
validateAllRules
(int stopAfterNumOfErrors) Deprecated.use getValidator and then call validateAll on IDfValidator insteadvoid
validateAttrRules
(String attrName, int stopAfterNumOfErrors) Deprecated.use getValidator and then call validateAttrRules on IDfValidator insteadvoid
validateAttrRulesWithValue
(String attrName, String value, int stopAfterNumOfErrors) Deprecated.use getValidator and then call validateAttrRules on IDfValidator insteadvoid
validateAttrRulesWithValues
(String attrName, IDfList valueList, int stopAfterNumOfErrors) Deprecated.use getValidator and then call validateAttrRules on IDfValidator insteadvoid
validateObjRules
(int stopAfterNumOfErrors) Deprecated.use getValidator and then call validateAllObjRules on IDfValidator insteadvoid
validateObjRulesWithValues
(IDfList attrNameList, IDfList valueListList, int stopAfterNumOfErrors) Deprecated.use getValidator and then call validateAllObjRules on IDfValidator insteadMethods inherited from interface com.documentum.fc.client.IDfTypedObject
appendBoolean, appendDouble, appendId, appendInt, appendString, appendTime, appendValue, dump, enumAttrs, findAttrIndex, findBoolean, findDouble, findId, findInt, findString, findTime, findValue, getAllRepeatingStrings, getAttr, getAttrCount, getAttrDataType, getBoolean, getDouble, getId, getInt, getLong, getObjectId, getObjectSession, getOriginalSession, getRepeatingBoolean, getRepeatingDouble, getRepeatingId, getRepeatingInt, getRepeatingLong, getRepeatingString, getRepeatingTime, getRepeatingValue, getSession, getSessionManager, getString, getTime, getValue, getValueAt, getValueCount, hasAttr, insertBoolean, insertDouble, insertId, insertInt, insertString, insertTime, insertValue, isAttrRepeating, isNull, remove, removeAll, setBoolean, setDouble, setId, setInt, setNull, setRepeatingBoolean, setRepeatingDouble, setRepeatingId, setRepeatingInt, setRepeatingString, setRepeatingTime, setRepeatingValue, setSessionManager, setString, setTime, setValue, truncate
-
Field Details
-
CURRENCY_CHECK_ALWAYS
Currency check value to always check if the object is current.- See Also:
-
CURRENCY_CHECK_NEVER
Currency check value to never check if the object is current.- See Also:
-
CURRENCY_CHECK_FIRST_ACCESS
Currency check value to only check currency for the first access.- See Also:
-
CURRENCY_CHECK_ONCE_PER_SCOPE
Currency check value to only check currency once per currency scope.- See Also:
-
-
Method Details
-
isDeleted
Returnstrue
if this object has been deleted during this session. This method will not returntrue
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 totrue
.- Throws:
DfException
- if server error occurs
-
isDirty
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
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
Indicates whether an object is a replica.- Throws:
DfException
- if a server error occurs
-
getType
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
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
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
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
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 thefetch
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 thecheckin
method to write the object back to the repository. You must use thesave
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. Specifynull
if you don't want the object persistently cached.usePersistentCache
- set totrue
if want the object the object cached persistentlyuseSharedCache
- 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
Saves an object to a Documentum server. You must have WRITE permission on an object to call thesave
method. Thesave
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
Discards any changes to an object that have not been saved to a repository.- Throws:
DfException
- if a server error occurs
-
destroy
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
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
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
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 typechildId
- child of this RelationchildLabel
- version string of the child. If this isnull
, the relation will contain no child label.isPermanent
- is the link permanent.description
- a user-friendly description for the relation object. Ifnull
, 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 typeparentId
- parent of this childchildLabel
- version string of the child. If this isnull
, the relation will contain no child label.isPermanent
- is the link permanent.description
- a user-friendly description for the relation object. Ifnull
, the relation object will not have a description.- Throws:
DfException
- if a server error occurs- See Also:
-
getChildRelatives
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
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 passingnull
as the value for eitherchildId
, orchildLabel
, or both. For example, if bothchildId
andchildLabel
arenull
, all relation objects where the relation type isrelationTypeName
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 passingnull
as the value for eitherparentId
, orchildLabel
, or both. For example, if bothparentId
andchildLabel
arenull
, all relation objects where the relation type isrelationTypeName
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
Deprecated.DMCL passthrough should not be used anymoreProvides a pass-through for DMCLdmAPIGet
calls. Application developers are encouraged to write to the DFC since all functionality in the server APIs can be accessed through these classes. SinceapiGet
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 theget
server API to the DFC, you would write the following code:mypersistobj.apiGet('get', 'object_name')
instead of writingdmAPIGet('get,c,090007d080001234,object_name')
where 090007d080001234 is the object ID ofmypersistobj
.- Parameters:
cmd
- the server APIargs
- the arguments for the API specified incmd
. (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 thedmAPISet
server API failed, or the current session has timed out and cannot be re-established- See Also:
-
apiSet
Deprecated.DMCL passthrough should not be used anymoreProvides a pass-through for DMCLdmAPISet
calls. Application developers are encouraged to write to the DFC since all functionality in the server APIs can be accessed through these classes. SinceapiSet
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 theset
server API to the DFC, you would write the following code:mypersistobj.apiSet('set', 'object_name, my_name')
instead of writingdmAPISet('set,c,090007d080001234,object_name,my_name')
where 090007d080001234 is the object ID ofmypersistobj
.- Parameters:
cmd
- the server APIargs
- the arguments for the API specified incmd
; 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 thedmAPISet
server API failed, or the current session has timed out and cannot be reestablished- See Also:
-
apiExec
Deprecated.DMCL passthrough should not be used anymoreProvides a pass-through for DMCLdmAPIExec
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 APIargs
- the arguments for the API specified incmd
(this does not include the session ID or the object ID).- Returns:
true
is always returned.- Throws:
DfException
- if thedmAPISet
server API failed, or the current session has timed out and cannot be reestablished- See Also:
-
getAttrAssistance
Deprecated.use getValidator and then call getValueAssistance on IDfValidator insteadReturns 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 insteadLists all legal values for an attribute.- Throws:
DfException
- if a server error occurs
-
getAttrAsstDependencies
Deprecated.use getValidator and then call getValueAssistanceDependencies on IDfValidator insteadIt returns the list of attributes on which the rule is depend on.- Parameters:
attrName
- the attribute to get the dependencies for- Throws:
DfException
-
getWidgetType
Deprecated.use getValidator and then call getWidgetType on IDfValidator insteadLook 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
Deprecated.use getValidator and then call validateAll on IDfValidator insteadValidateAllRules() 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
Deprecated.use getValidator and then call validateAttrRules on IDfValidator insteadIt 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 insteadIt 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 insteadIt 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
Deprecated.use getValidator and then call validateAllObjRules on IDfValidator insteadValidates 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 insteadIt 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
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
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
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
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
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.
-