Class RelationshipUtil

java.lang.Object
com.ads.api.util.BaseUtil
com.ads.api.util.RelationshipUtil

public class RelationshipUtil extends com.ads.api.util.BaseUtil
Contains the methods which performs the retrieval operation of relationships.
  • Method Details

    • getRelationship

      public Relationship getRelationship(int sourceObjectTypeId, int targetObjectTypeId, String title, APIConstants.RelationshipType relationshipType) throws Exception
      Returns the relationship object for the specified sourceObjectTypeId, targetObjectTypeId, title and relationshipType. Specifying the sourceObjectTypeId, targetObjectTypeId, title and relationshipType are mandatory.
      It returns all the details like relationShipDetailId, relationShipMasterId, forwardTitle, reverseTitle, description and relationshipType etc..
      Parameters:
      sourceObjectTypeId - int
      targetObjectTypeId - int
      title - String
      relationshipType - RelationshipType - Valid types: FORWARD, REVERSE, BOTH.
      Returns:
      Relationship object
      Throws:
      Exception
      Since:
      12.0
    • getRelationship

      public Relationship getRelationship(int sourceObjectTypeId, int targetObjectTypeId, String title) throws Exception
      Returns the relationship object for the specified sourceObjectTypeId, targetObjectTypeId and title. Specifying the sourceObjectTypeId, title, and targetObjectTypeId are mandatory.
      It returns all the details like relationShipDetailId, relationShipMasterId, forwardTitle, reverseTitle, description and relationshipType etc..
      Parameters:
      sourceObjectTypeId - int
      targetObjectTypeId - int
      title - String
      Returns:
      Relationship
      Throws:
      Exception
      Since:
      12.0
    • getRelationships

      public List<Relationship> getRelationships(int sourceObjectTypeId, int targetObjectTypeId) throws Exception
      Returns the list of relationship objects for the specified sourceObjectTypeId and targetObjectTypeId. Specifying the sourceObjectTypeId and targetObjectTypeId are mandatory.
      It returns all the details like relationShipDetailId, relationShipMasterId, forwardTitle, reverseTitle, description and relationshipType etc..
      Parameters:
      sourceObjectTypeId - int
      targetObjectTypeId - int
      Returns:
      List of Relationships
      Throws:
      Exception
      Since:
      12.0
    • getRelationships

      public List<Relationship> getRelationships(int sourceObjectTypeId, String title) throws Exception
      Returns the list of relationship object for the specified title and sourceObjectTypeId. Specifying the sourceObjectTypeId and title are mandatory.
      It returns all the details like relationShipDetailId, relationShipMasterId, forwardTitle, reverseTitle, description and relationshipType etc..
      Parameters:
      sourceObjectTypeId - int
      title - String
      Returns:
      List of Relationships
      Throws:
      Exception
      Since:
      12.0
    • getRelationships

      public List<Relationship> getRelationships(int sourceObjectTypeId, String title, APIConstants.RelationshipType relationshipType) throws Exception
      Returns the list of relationship objects for the specified sourceObjectTypeId, title and relationshipType. Specifying the sourceObjectTypeId, title and relationshipType are mandatory.
      It returns all the details like relationShipDetailId, relationShipMasterId, forwardTitle, reverseTitle, description and relationshipType etc..
      Parameters:
      sourceObjectTypeId - int
      title - String
      relationshipType - RelationshipType - Valid types: FORWARD, REVERSE, BOTH.
      Returns:
      List of Relationships
      Throws:
      Exception
      Since:
      12.0
    • getRelationships

      public List<Relationship> getRelationships(int sourceObjectTypeId) throws Exception
      Returns the list of relationship objects for the specified sourceObjectTypeId. Specifying the sourceObjectTypeId is mandatory.
      It returns all the details like relationShipDetailId, relationShipMasterId, forwardTitle, reverseTitle, description and relationshipType etc..
      Parameters:
      sourceObjectTypeId - int
      Returns:
      List of Relationships
      Throws:
      Exception
      Since:
      12.0
    • getRelationships

      public List<Relationship> getRelationships(APIConstants.RelationshipType relationshipType, String title) throws Exception
      Returns the list relationship objects for the specified relationshipType and title. Specifying the relationshipType and title are mandatory.
      It returns all the details like relationShipDetailId, relationShipMasterId, forwardTitle, reverseTitle, description and relationshipType etc..
      Parameters:
      relationshipType - RelationshipType - Valid types: FORWARD, REVERSE, BOTH.
      title - String
      Returns:
      List of Relationships
      Throws:
      Exception
      Since:
      12.0
    • getRelationships

      public List<Relationship> getRelationships(APIConstants.RelationshipType relationshipType) throws Exception
      Returns the list of relationship objects for the specified relationshipType. Specifying the relationshipType is mandatory.
      It returns all the details like relationShipDetailId, relationShipMasterId, forwardTitle, reverseTitle, description and relationshipType etc..
      Parameters:
      relationshipType - RelationshipType - Valid types: FORWARD, REVERSE, BOTH.
      Returns:
      List of Relationships
      Throws:
      Exception
      Since:
      12.0
    • getRelationships

      public List<Relationship> getRelationships() throws Exception
      Returns the list of all relationship objects present in the association.
      Returns:
      List of Relationships
      Throws:
      Exception
      Since:
      12.0
    • getRelationshipAs

      public String getRelationshipAs(int sourceObjectTypeId, int targetObjectTypeId, String title, String relationshipType, String outputFormat)
      Returns the relationship object for the specified sourceObjectTypeId, targetObjectTypeId, title and relationshipType. Specifying the sourceObjectTypeId, targetObjectTypeId, title and relationshipType are mandatory.
      It returns all the details like relationShipDetailId, relationShipMasterId, forwardTitle, reverseTitle, description and relationshipType etc..
      OutputFormat can be either JSON or XML. If outputFormat is not specified, by default the method will return the JSON String.
      Parameters:
      sourceObjectTypeId - int
      targetObjectTypeId - int
      title - String
      relationshipType - String - Valid types: FORWARD, REVERSE, BOTH.
      outputFormat - String - Valid values: JSON or XML.
      Returns:
      String - Relationship object in the form of JSON or XML String.
      Since:
      12.0
    • getRelationshipsAs

      public String getRelationshipsAs(String outputFormat)
      Returns the list of all the relationship objects present in the business glossary module.
      OutputFormat can be either JSON or XML. If outputFormat is not specified, by default the method will return the JSON String.
      Parameters:
      outputFormat - String - Valid values: JSON or XML.
      Returns:
      String - List of relationship objects in the form of JSON or XML String.
      Since:
      12.0