Interface IDfRelationType

All Superinterfaces:
IDfPersistentObject, IDfTypedObject
All Known Subinterfaces:
IDfForeignKey

public interface IDfRelationType extends IDfPersistentObject
Interface definition for the type dm_relation_type. Each kind of relationship is described in a dm_relation_type object. The attributes of a relation type object name the relationship and define what security applies to instances of that relationship. Relation type objects include an attribute that contains a description of the relationship.
  • Field Details

    • REFERENCE_CHILD

      static final int REFERENCE_CHILD
      Reference existing children when parent document is copied.
      See Also:
    • COPY_CHILD

      static final int COPY_CHILD
      Create new copies of referenced children when parent document is copied.
      See Also:
    • SYSTEM

      static final String SYSTEM
      SYSTEM security means that only superusers or system administrators can directly create, modify, or drop instances of the relationship.
      See Also:
    • PARENT

      static final String PARENT
      PARENT security means the permissions to create, modify, or drop instances of a relationship depend on the object type of the parent.
      See Also:
    • CHILD

      static final String CHILD
      CHILD security means the permissions to create, modify, or drop instances of a relationship depend on the object type of the child.
      See Also:
    • NONE

      static final String NONE
      NONE security means that any user can create, modify, or drop relationships of that kind.
      See Also:
  • Method Details

    • getRelationName

      String getRelationName() throws DfException
      Returns the value of the relation_name attribute. This indicates the name of the relationship. Names are unique. The names of system defined relationships begin with dm_.
      Returns:
      the name of the relation.
      Throws:
      DfException - if a server error occurs.
      See Also:
    • getSecurityType

      String getSecurityType() throws DfException
      Returns the security applied to objects of type dm_relation_type whose relation_name attribute value matches the relation_name attribute for the dm_relation_type object.
      Returns:
      the security applied to the object. Valid return values are "SYSTEM", "PARENT", "CHILD" and "NONE".
      Throws:
      DfException - if a server error occurs.
      See Also:
    • getParentType

      String getParentType() throws DfException
      Returns the object type of a valid parent object in the relationship.
      Returns:
      the object type of a valid parent object.
      Throws:
      DfException - if a server error occurs.
      See Also:
    • getChildType

      String getChildType() throws DfException
      Returns the object type of a valid child object in the relationship.
      Returns:
      the object type of a valid child object.
      Throws:
      DfException - if a server error occurs.
      See Also:
    • getDescription

      String getDescription() throws DfException
      Returns the user defined description of the relationship.
      Returns:
      the description of the relationship.
      Throws:
      DfException - if a server error occurs.
      See Also:
    • getPermanentLink

      boolean getPermanentLink() throws DfException
      Indicates if you want to maintain the relationship across versions of the parent object.

      By default, relationships are not maintained across versions. However, if you want the relationship to be maintained across versions when the parent object is versioned, set permanent_link via setPermanentLink to true.

      Returns:
      true if a relationship across versions exists, or false if a relationship does not exist.
      Throws:
      DfException - if server does not support this attribute (pre 5.3)
      Since:
      5.3.
      See Also:
    • getCopyBehavior

      int getCopyBehavior() throws DfException
      Returns the copy behavior defined for the relation of this type.

      The copy behavior defined for a relation determines how the child is handled when the parent object is copied. Copy behavior is used only when getPermanentLink () is true

      For more information about copy behavior, refer to Server Fundamentals.

      Returns:
      An integer indicating the copy behavior for the relation of this type. Valid values and their meanings are:
       Value                Meaning
       REFERENCE_CHILD       Reference the existing component document.
       COPY_CHILD            Create a new copy of the component document. 
      Throws:
      DfException - if server does not support this attribute (pre 5.3)
      Since:
      5.3.
      See Also:
    • getControllingKind

      String getControllingKind() throws DfException
      Returns the controlling kind attribute defined for the relation of this type.

      The controlling kind attribute indicates whether the relation type is created by external users or the application. If the relation type is created by external user, then the user can create and destroy instances of dm_relation based on the relation type. For more information about controlling kind, refer to Server Fundamentals.

      Returns:
      A String indicating the controlling kind for the relation of this type.
      Throws:
      DfException - if server does not support this attribute (pre 6.0)
      Since:
      6.0.
      See Also:
    • setRelationName

      void setRelationName(String rName) throws DfException
      Sets the value of the relation_name attribute. This indicates the name of the relationship. Names are unique. The names of system defined relationships begin with dm_.
      Parameters:
      rName - the name of the relation.
      Throws:
      DfException - if a server error occurs.
      See Also:
    • setSecurityType

      void setSecurityType(String sType) throws DfException
      Sets the security applied to objects of type dm_relation whose relation_name attribute value matches the relation_name attribute for the dm_relation_type object.
      Parameters:
      sType - the security applied to the object. Valid values are "SYSTEM", "PARENT", "CHILD" and "NONE".
      Throws:
      DfException - if a server error occurs.
      See Also:
    • setParentType

      void setParentType(String parent) throws DfException
      Sets the object type of a valid parent object in the relationship.
      Parameters:
      parent - the object type of a valid parent object.
      Throws:
      DfException - if a server error occurs.
      See Also:
    • setChildType

      void setChildType(String child) throws DfException
      Sets the object type of a valid child object in the relationship.
      Parameters:
      child - the object type of a valid child object.
      Throws:
      DfException - if a server error occurs.
      See Also:
    • setDescription

      void setDescription(String desc) throws DfException
      Sets the user defined description of the relationship.
      Parameters:
      desc - the description of the relationship.
      Throws:
      DfException - if a server error occurs.
      See Also:
    • setPermanentLink

      void setPermanentLink(boolean val) throws DfException
      Indicates if you want to maintain the relationship across versions of the parent object. By default, relationships are not maintained across versions. However, if you want the relationship to be maintained across versions when the parent object is versioned, set permanent_link via setPermanentLink to true.
      Parameters:
      val - value of the permanent_link flag.
      Throws:
      DfException - if server does not support this attribute (pre 5.3)
      Since:
      5.3.
      See Also:
    • setCopyBehavior

      void setCopyBehavior(int val) throws DfException
      Sets the copy behavior defined for the relation of this type.

      The copy behavior defined for a relation determines how the child is handled when the parent object is copied. Copy behavior is used only when getPermanentLink () is true

      For more information about copy behavior, refer to Server Fundamentals.

      Parameters:
      val - value indicating the copy behavior for the relation of this type. Valid values and their meanings are:
       Value                Meaning
       REFERENCE_CHILD       Reference the existing component document.
       COPY_CHILD            Create a new copy of the component document. 
      Throws:
      DfException - if server does not support this attribute (pre 5.3)
      Since:
      5.3.
      See Also:
    • setControllingKind

      void setControllingKind(String val) throws DfException
      Sets the controlling kind attribute defined for the relation of this type.

      The controlling kind attribute indicates whether the relation type is created by external users or the application. If the relation type is created by external user, then the user can create and destroy instances of dm_relation based on the relation type. For more information about controlling kind, refer to Server Fundamentals.

      Parameters:
      val - value indicating the controlling kind for the relation of this type.
      Throws:
      DfException - if server does not support this attribute (pre 6.0)
      Since:
      6.0.
      See Also: