Package com.collibra.dgc.core.api.component.meta

# Interface RelationTypeApi

public interface RelationTypeApi
Contains all API operations for handling Relation Types.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `RelationType`
  `addRelationType(AddRelationTypeRequest addRelationTypeRequest)`
  Adds a Relation Type.
  `List<RelationType>`
  `addRelationTypes(List<AddRelationTypeRequest> addRelationTypeRequests)`
  Adds multiple Relation Types.
  `RelationType`
  `changeRelationType(ChangeRelationTypeRequest changeRelationTypeRequest)`
  Changes the Relation Type with the information that is present in the request.
  `List<RelationType>`
  `changeRelationTypes(List<ChangeRelationTypeRequest> changeRelationTypeRequests)`
  Changes multiple Relation Types.
  `boolean`
  `exists(UUID relationTypeId)`
  Returns true if a Relation Type with given `id` exists.
  `PagedResponse<RelationType>`
  `findRelationTypes(FindRelationTypesRequest findRequest)`
  Returns Relation Types matching the given search input.
  `RelationType`
  `getRelationType(UUID relationTypeId)`
  Returns the Relation Type for the given UUID.
  `RelationType`
  `getRelationTypeByPublicId(String publicId)`
  Returns the relation type identified by the given public id.
  `void`
  `removeRelationType(UUID relationTypeId)`
  Remove the Relation Type with the given id.
  `Job`
  `removeRelationTypeInJob(UUID relationTypeId)`
  Remove the Relation Type with the given id asynchronously.
  `void`
  `removeRelationTypes(List<UUID> relationTypeIds)`
  Remove multiple Relation Types with the given ids.
  `Job`
  `removeRelationTypesInJob(List<UUID> relationTypeIds)`
  Remove multiple Relation Types with the given ids asynchronously.

- ## Method Details

  - ### getRelationType

    RelationType getRelationType(UUID relationTypeId)
    Returns the Relation Type for the given UUID.
    Parameters:
      `relationTypeId` - the UUID of the Relation Type we want to fetch
    Returns:
      the found Relation Type

  - ### getRelationTypeByPublicId

    RelationType getRelationTypeByPublicId(String publicId)
    Returns the relation type identified by the given public id.
    Parameters:
      `publicId` - the public id of the relation type
    Returns:
      the found relation type

  - ### exists

    boolean exists(UUID relationTypeId)
    Returns true if a Relation Type with given `id` exists.
    Parameters:
      `relationTypeId` - the `id` of the Relation Type
    Returns:
      true if a Relation Type with given `id` exists, `false` otherwise

  - ### addRelationType

    RelationType addRelationType(AddRelationTypeRequest addRelationTypeRequest)
    Adds a Relation Type.
    Parameters:
      `addRelationTypeRequest` - information required to create the Relation Type
    Returns:
      the created Relation Type

  - ### addRelationTypes

    @SecurityAuditMethod(resultFormatter=com.collibra.audit.formatter.CollectionFormatter.class) List<RelationType> addRelationTypes(List<AddRelationTypeRequest> addRelationTypeRequests)
    Adds multiple Relation Types.
    Parameters:
      `addRelationTypeRequests` - information required to create the Relation Type
    Returns:
      the created Relation Types

  - ### removeRelationType

    void removeRelationType(UUID relationTypeId)
    Remove the Relation Type with the given id.
    Parameters:
      `relationTypeId` - the id of the Relation Type

  - ### removeRelationTypeInJob

    Job removeRelationTypeInJob(UUID relationTypeId)
    Remove the Relation Type with the given id asynchronously.
    Parameters:
      `relationTypeId` - the id of the Relation Type

  - ### removeRelationTypes

    void removeRelationTypes(List<UUID> relationTypeIds)
    Remove multiple Relation Types with the given ids.
    Parameters:
      `relationTypeIds` - the ids of the Relation Type

  - ### removeRelationTypesInJob

    Job removeRelationTypesInJob(List<UUID> relationTypeIds)
    Remove multiple Relation Types with the given ids asynchronously.
    Parameters:
      `relationTypeIds` - the ids of the Relation Type

  - ### changeRelationType

    RelationType changeRelationType(ChangeRelationTypeRequest changeRelationTypeRequest)
    Changes the Relation Type with the information that is present in the request. Only properties that are specified in this request and have not `null` values are updated. All other properties are ignored.
    Parameters:
      `changeRelationTypeRequest` - the properties of the Relation Type to be changed
    Returns:
      the changed Relation Type

  - ### changeRelationTypes

    @SecurityAuditMethod(resultFormatter=com.collibra.audit.formatter.CollectionFormatter.class) List<RelationType> changeRelationTypes(List<ChangeRelationTypeRequest> changeRelationTypeRequests)
    Changes multiple Relation Types.
    Parameters:
      `changeRelationTypeRequests` - the properties of the Relation Types to be changed
    Returns:
      the changed Relation Types

  - ### findRelationTypes

    @SecurityAuditMethod(resultFormatter=com.collibra.dgc.core.api.internal.security.audit.formatter.PagedResponseFormatter.class) PagedResponse<RelationType> findRelationTypes(FindRelationTypesRequest findRequest)
    Returns Relation Types matching the given search input.
    Parameters:
      `findRequest` - specified search criteria for search Relation Types
    Returns:
      the found Relation Types