Package com.emc.documentum.rest.model

# Class PersistentObject

java.lang.Object
com.emc.documentum.rest.model.AbstractLinkable
com.emc.documentum.rest.model.PersistentObject

All Implemented Interfaces:
  `com.emc.documentum.rest.conditional.Digestible`, `Linkable`

Direct Known Subclasses:
  `AclObject`, `AuditEvent`, `AuditTrail`, `ContentMetaData`, `Format`, `GroupMember`, `GroupObject`, `JobObject`, `QueryResultItem`, `RelationObject`, `RelationTypeObject`, `SysObject`, `TypeObject`, `UserObject`

public class PersistentObject extends AbstractLinkable implements com.emc.documentum.rest.conditional.Digestible
Persistent object resource.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected String`
  `id`
  ID of persistent object
  `protected boolean`
  `isLightweight`
  whether the object is lightweight object
  `protected boolean`
  `isMaterialized`
  whether the lightweight object is materialized
  `protected boolean`
  `isSnapshot`
  whether the object is snapshot
  `protected boolean`
  `isVirtual`
  whether the object is virtual
  `protected Map<String,Object>`
  `mandatoryAttributes`
  Mandatory fields
  `protected Map<String,Object>`
  `optionalAttributes`
  Optional fields
  `protected String`
  `parentId`
  the parent object id
  `protected Permissions`
  `permissions`
  Permission of persistent object
  `protected List<Attribute<?>>`
  `properties`
  Properties of persistent object
  `protected String`
  `reqDigest`
  `protected String`
  `type`
  Type of persistent object
  `protected String`
  `typeDef`
  Type definition
  `protected VersionPolicy`
  `versionPolicy`
  Version policy of persistent object

  ### Fields inherited from class com.emc.documentum.rest.model.AbstractLinkable

  `links`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PersistentObject()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addAttribute(Attribute<?> attr)`
  Add attribute
  `void`
  `addMandatoryAttribute(String name, Object value)`
  Add the mandatory attribute into the persistent object
  `void`
  `addOptionalAttribute(String name, Object value)`
  Add the optional attribute into the persistent object
  `String`
  `calculatesDigest()`
  `boolean`
  `convertDate()`
  whether need convert date object to string during convert by default, PersistentObject will always convert date string
  `Object`
  `geOptionalAttribute(String name)`
  Get optional attribute of the persistent object by name.
  `Object`
  `getAttributeByName(String name)`
  Get attribute value by name
  `Collection<Attribute<?>>`
  `getAttributes()`
  Get the attribute collection of the persistent object
  `String`
  `getId()`
  Get object ID of the persistent object
  `List<String>`
  `getInternalFields()`
  Get internal attribute names
  `Object`
  `getMandatoryAttribute(String name)`
  Get mandatory attribute of the persistent object by name.
  `List<String>`
  `getMandatoryFields()`
  Get mandatory attribute names
  `List<String>`
  `getOptionalFields()`
  Get optional attribute names
  `String`
  `getParentId()`
  `Permissions`
  `getPermissions()`
  Get permissions
  `String`
  `getReqDigest()`
  `String`
  `getType()`
  Get object type of the persistent object; if it is not specified explicitly, return the attribute "r_object_type" by alternate.
  `String`
  `getTypeDef()`
  Get the type definition of the persistent object in URI
  `VersionPolicy`
  `getVersionPolicy()`
  Get version policy
  `boolean`
  `hasAttribute(String name)`
  Check whether the persistent object has the given attribute
  `boolean`
  `hasAttributeValue(String name)`
  Check whether the attribute value is not empty
  `boolean`
  `hasOptionalAttribute(String name)`
  Check whether the persistent object has the given optional attribute
  `boolean`
  `isLightweight()`
  `boolean`
  `isMatchedWithReqDigest(String digest)`
  `boolean`
  `isMaterialized()`
  `boolean`
  `isSnapshot()`
  `boolean`
  `isVirtualDocument()`
  `void`
  `reInitAttributes()`
  Reset the properties of the persistent object
  `boolean`
  `removeAttributeIfExisted(String name)`
  Remove an attribute by name if it does exist
  `void`
  `setId(String id)`
  Set object ID of the persistent object
  `void`
  `setIsSnapshot(boolean snapshot)`
  `void`
  `setIsVirtualDocument(boolean virtual)`
  `void`
  `setLightweight(boolean isLightweight)`
  set whether the object is lightweight object
  `void`
  `setMaterialized(boolean isMaterialized)`
  set whether the lightweight object is materialized
  `void`
  `setParentId(String parentId)`
  set the parent object id
  `void`
  `setPermissions(int basic, String extended)`
  Set permissions
  `void`
  `setReqDigest(String reqDigest)`
  `void`
  `setType(String type)`
  Set the object type of the persistent object
  `void`
  `setTypeDef(String typeDef)`
  Set the type definition of the persistent object in URI
  `void`
  `setVersionPolicy(VersionPolicy policy)`
  Set version policy
  `String`
  `toString()`

  ### Methods inherited from class com.emc.documentum.rest.model.AbstractLinkable

  `getLinks, setLinks`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### type

    protected String type
    Type of persistent object

  - ### typeDef

    protected String typeDef
    Type definition

  - ### properties

    protected List<Attribute<?>> properties
    Properties of persistent object

  - ### mandatoryAttributes

    protected Map<String,Object> mandatoryAttributes
    Mandatory fields

  - ### optionalAttributes

    protected Map<String,Object> optionalAttributes
    Optional fields

  - ### id

    protected String id
    ID of persistent object

  - ### permissions

    protected Permissions permissions
    Permission of persistent object

  - ### versionPolicy

    protected VersionPolicy versionPolicy
    Version policy of persistent object

  - ### isLightweight

    protected boolean isLightweight
    whether the object is lightweight object

  - ### isMaterialized

    protected boolean isMaterialized
    whether the lightweight object is materialized

  - ### isSnapshot

    protected boolean isSnapshot
    whether the object is snapshot

  - ### isVirtual

    protected boolean isVirtual
    whether the object is virtual

  - ### parentId

    protected String parentId
    the parent object id

  - ### reqDigest

    protected String reqDigest

- ## Constructor Details

  - ### PersistentObject

    public PersistentObject()

- ## Method Details

  - ### getId

    public String getId()
    Get object ID of the persistent object
    Returns:
      ID

  - ### setId

    public void setId(String id)
    Set object ID of the persistent object
    Parameters:
      `id` - object ID

  - ### getType

    public String getType()
    Get object type of the persistent object; if it is not specified explicitly, return the attribute "r_object_type" by alternate.
    Returns:
      type

  - ### setType

    public void setType(String type)
    Set the object type of the persistent object
    Parameters:
      `type` - object type

  - ### getTypeDef

    public String getTypeDef()
    Get the type definition of the persistent object in URI
    Returns:
      type definition

  - ### setTypeDef

    public void setTypeDef(String typeDef)
    Set the type definition of the persistent object in URI
    Parameters:
      `typeDef` - type definition

  - ### reInitAttributes

    public void reInitAttributes()
    Reset the properties of the persistent object

  - ### getMandatoryAttribute

    public Object getMandatoryAttribute(String name)
    Get mandatory attribute of the persistent object by name. The mandatory attributes will not be put into the representation.
    Parameters:
      `name` - the attribute name
    Returns:
      mandatory attributes

  - ### addMandatoryAttribute

    public void addMandatoryAttribute(String name, Object value)
    Add the mandatory attribute into the persistent object
    Parameters:
      `name` - the attribute name
      `value` - the attribute value

  - ### getMandatoryFields

    public List<String> getMandatoryFields()
    Get mandatory attribute names
    Returns:
      mandatory fields

  - ### geOptionalAttribute

    public Object geOptionalAttribute(String name)
    Get optional attribute of the persistent object by name. The optional attributes will not be put into the representation.
    Parameters:
      `name` - the attribute name
    Returns:
      optional attribute value

  - ### addOptionalAttribute

    public void addOptionalAttribute(String name, Object value)
    Add the optional attribute into the persistent object
    Parameters:
      `name` - the attribute name
      `value` - the attribute value

  - ### getOptionalFields

    public List<String> getOptionalFields()
    Get optional attribute names
    Returns:
      optional attribute names

  - ### getInternalFields

    public List<String> getInternalFields()
    Get internal attribute names
    Returns:
      internal fields

  - ### getPermissions

    public Permissions getPermissions()
    Get permissions
    Returns:
      permissions

  - ### setPermissions

    public void setPermissions(int basic, String extended)
    Set permissions
    Parameters:
      `basic` - basic permission
      `extended` - extended permission

  - ### setVersionPolicy

    public void setVersionPolicy(VersionPolicy policy)
    Set version policy
    Parameters:
      `policy` - version policy

  - ### getVersionPolicy

    public VersionPolicy getVersionPolicy()
    Get version policy
    Returns:
      version policy

  - ### getAttributes

    public Collection<Attribute<?>> getAttributes()
    Get the attribute collection of the persistent object
    Returns:
      attribute collection

  - ### removeAttributeIfExisted

    public boolean removeAttributeIfExisted(String name)
    Remove an attribute by name if it does exist
    Parameters:
      `name` - the attribute name
    Returns:
      `true` if the specified attribute is removed

  - ### addAttribute

    public void addAttribute(Attribute<?> attr)
    Add attribute
    Parameters:
      `attr` - attribute to add

  - ### getAttributeByName

    public Object getAttributeByName(String name)
    Get attribute value by name
    Parameters:
      `name` - the attribute name to get
    Returns:
      attribute

  - ### hasAttribute

    public boolean hasAttribute(String name)
    Check whether the persistent object has the given attribute
    Parameters:
      `name` - the attribute name
    Returns:
      `true` if the attribute exists in the persistent object; `false` otherwise.

  - ### hasAttributeValue

    public boolean hasAttributeValue(String name)
    Check whether the attribute value is not empty
    Parameters:
      `name` - the attribute name
    Returns:
      `true` if the attribute value is not empty

  - ### hasOptionalAttribute

    public boolean hasOptionalAttribute(String name)
    Check whether the persistent object has the given optional attribute
    Parameters:
      `name` - the attribute name
    Returns:
      `true` if the attribute exists in the persistent object; `false` otherwise.

  - ### isLightweight

    public boolean isLightweight()
    Returns:
      whether the object is lightweight object

  - ### setLightweight

    public void setLightweight(boolean isLightweight)
    set whether the object is lightweight object
    Parameters:
      `isLightweight` - is lightweight object or not

  - ### isMaterialized

    public boolean isMaterialized()
    Returns:
      whether the lightweight object is materialized

  - ### setMaterialized

    public void setMaterialized(boolean isMaterialized)
    set whether the lightweight object is materialized
    Parameters:
      `isMaterialized` - is materialized or not

  - ### isSnapshot

    public boolean isSnapshot()

  - ### setIsSnapshot

    public void setIsSnapshot(boolean snapshot)

  - ### setIsVirtualDocument

    public void setIsVirtualDocument(boolean virtual)

  - ### isVirtualDocument

    public boolean isVirtualDocument()

  - ### getParentId

    public String getParentId()
    Returns:
      the parent object id

  - ### setParentId

    public void setParentId(String parentId)
    set the parent object id
    Parameters:
      `parentId` - the parent object id

  - ### convertDate

    public boolean convertDate()
    whether need convert date object to string during convert by default, PersistentObject will always convert date string
    Returns:
      convert date

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### calculatesDigest

    public String calculatesDigest()
    Specified by:
      `calculatesDigest` in interface `com.emc.documentum.rest.conditional.Digestible`

  - ### setReqDigest

    public void setReqDigest(String reqDigest)
    Specified by:
      `setReqDigest` in interface `com.emc.documentum.rest.conditional.Digestible`

  - ### getReqDigest

    public String getReqDigest()
    Specified by:
      `getReqDigest` in interface `com.emc.documentum.rest.conditional.Digestible`

  - ### isMatchedWithReqDigest

    public boolean isMatchedWithReqDigest(String digest)
    Specified by:
      `isMatchedWithReqDigest` in interface `com.emc.documentum.rest.conditional.Digestible`