Package com.ads.api.util

# 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.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class com.ads.api.util.BaseUtil

  `com.ads.api.util.BaseUtil.TokenType`

- ## Field Summary

  ### Fields inherited from class com.ads.api.util.BaseUtil

  `AUTH_TOKEN, AUTH_TOKEN_TYPE`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Relationship`
  `getRelationship(int sourceObjectTypeId, int targetObjectTypeId, String title)`
  Returns the relationship object for the specified sourceObjectTypeId, targetObjectTypeId and title.
  `Relationship`
  `getRelationship(int sourceObjectTypeId, int targetObjectTypeId, String title, APIConstants.RelationshipType relationshipType)`
  Returns the relationship object for the specified sourceObjectTypeId, targetObjectTypeId, title and relationshipType.
  `String`
  `getRelationshipAs(int sourceObjectTypeId, int targetObjectTypeId, String title, String relationshipType, String outputFormat)`
  Returns the relationship object for the specified sourceObjectTypeId, targetObjectTypeId, title and relationshipType.
  `List<Relationship>`
  `getRelationships()`
  Returns the list of all relationship objects present in the association.
  `List<Relationship>`
  `getRelationships(int sourceObjectTypeId)`
  Returns the list of relationship objects for the specified sourceObjectTypeId.
  `List<Relationship>`
  `getRelationships(int sourceObjectTypeId, int targetObjectTypeId)`
  Returns the list of relationship objects for the specified sourceObjectTypeId and targetObjectTypeId.
  `List<Relationship>`
  `getRelationships(int sourceObjectTypeId, String title)`
  Returns the list of relationship object for the specified title and sourceObjectTypeId.
  `List<Relationship>`
  `getRelationships(int sourceObjectTypeId, String title, APIConstants.RelationshipType relationshipType)`
  Returns the list of relationship objects for the specified sourceObjectTypeId, title and relationshipType.
  `List<Relationship>`
  `getRelationships(APIConstants.RelationshipType relationshipType)`
  Returns the list of relationship objects for the specified relationshipType.
  `List<Relationship>`
  `getRelationships(APIConstants.RelationshipType relationshipType, String title)`
  Returns the list relationship objects for the specified relationshipType and title.
  `String`
  `getRelationshipsAs(String outputFormat)`
  Returns the list of all the relationship objects present in the business glossary module.

  ### Methods inherited from class com.ads.api.util.BaseUtil

  `getAccessToken, getAccessTokenType, getTokenType, getUserDetails, permissionDeniedMessage, permissionDeniedStatus, setAccessToken, setAccessTokenType`

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

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

- ## 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