Class DatapartitionClient

java.lang.Object
com.clinia.ApiClient
com.clinia.api.DatapartitionClient
All Implemented Interfaces:
Closeable, AutoCloseable

public class DatapartitionClient extends ApiClient
  • Constructor Details

    • DatapartitionClient

      public DatapartitionClient(String workspaceId, String apiKey)
    • DatapartitionClient

      public DatapartitionClient(String workspaceId, String apiKey, ClientOptions options)
  • Method Details

    • getCollectionResource

      public <T> V1DomainResourceWithIncludes<T> getCollectionResource(@Nonnull String partitionKey, @Nonnull String collectionKey, @Nonnull String resourceId, List<String> includes, Class<T> innerType, RequestOptions requestOptions) throws CliniaRuntimeException
      Retrieves a resource from a data partition.
      Parameters:
      partitionKey - (required)
      collectionKey - (required)
      resourceId - The resource ID. Can also be an identifier with one of the following formats: - `{sourceKey}:{sourceRecordId}:source` (e.g. `mySourceA:123:source`). This is useful to fetch a record when knowing its source record id. - `mdm:{unifiedRecordId}:old` (e.g. `mdm:123:old`). This is useful to fetch a unified record id that does not exist anymore after being merged. (required)
      includes - List of relationship property key (included resources) to includes with the response. (optional)
      innerType - The class held by the collection, could be your custom class or Object.
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Throws:
      CliniaRuntimeException - If it fails to process the API call
    • getCollectionResource

      public <T> V1DomainResourceWithIncludes<T> getCollectionResource(@Nonnull String partitionKey, @Nonnull String collectionKey, @Nonnull String resourceId, List<String> includes, Class<T> innerType) throws CliniaRuntimeException
      Retrieves a resource from a data partition.
      Parameters:
      partitionKey - (required)
      collectionKey - (required)
      resourceId - The resource ID. Can also be an identifier with one of the following formats: - `{sourceKey}:{sourceRecordId}:source` (e.g. `mySourceA:123:source`). This is useful to fetch a record when knowing its source record id. - `mdm:{unifiedRecordId}:old` (e.g. `mdm:123:old`). This is useful to fetch a unified record id that does not exist anymore after being merged. (required)
      includes - List of relationship property key (included resources) to includes with the response. (optional)
      innerType - The class held by the collection, could be your custom class or Object.
      Throws:
      CliniaRuntimeException - If it fails to process the API call
    • getCollectionResource

      public <T> V1DomainResourceWithIncludes<T> getCollectionResource(@Nonnull String partitionKey, @Nonnull String collectionKey, @Nonnull String resourceId, Class<T> innerType, RequestOptions requestOptions) throws CliniaRuntimeException
      Retrieves a resource from a data partition.
      Parameters:
      partitionKey - (required)
      collectionKey - (required)
      resourceId - The resource ID. Can also be an identifier with one of the following formats: - `{sourceKey}:{sourceRecordId}:source` (e.g. `mySourceA:123:source`). This is useful to fetch a record when knowing its source record id. - `mdm:{unifiedRecordId}:old` (e.g. `mdm:123:old`). This is useful to fetch a unified record id that does not exist anymore after being merged. (required)
      innerType - The class held by the collection, could be your custom class or Object.
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Throws:
      CliniaRuntimeException - If it fails to process the API call
    • getCollectionResource

      public <T> V1DomainResourceWithIncludes<T> getCollectionResource(@Nonnull String partitionKey, @Nonnull String collectionKey, @Nonnull String resourceId, Class<T> innerType) throws CliniaRuntimeException
      Retrieves a resource from a data partition.
      Parameters:
      partitionKey - (required)
      collectionKey - (required)
      resourceId - The resource ID. Can also be an identifier with one of the following formats: - `{sourceKey}:{sourceRecordId}:source` (e.g. `mySourceA:123:source`). This is useful to fetch a record when knowing its source record id. - `mdm:{unifiedRecordId}:old` (e.g. `mdm:123:old`). This is useful to fetch a unified record id that does not exist anymore after being merged. (required)
      innerType - The class held by the collection, could be your custom class or Object.
      Throws:
      CliniaRuntimeException - If it fails to process the API call
    • getCollectionResourceAsync

      public <T> CompletableFuture<V1DomainResourceWithIncludes<T>> getCollectionResourceAsync(@Nonnull String partitionKey, @Nonnull String collectionKey, @Nonnull String resourceId, List<String> includes, Class<T> innerType, RequestOptions requestOptions) throws CliniaRuntimeException
      (asynchronously) Retrieves a resource from a data partition.
      Parameters:
      partitionKey - (required)
      collectionKey - (required)
      resourceId - The resource ID. Can also be an identifier with one of the following formats: - `{sourceKey}:{sourceRecordId}:source` (e.g. `mySourceA:123:source`). This is useful to fetch a record when knowing its source record id. - `mdm:{unifiedRecordId}:old` (e.g. `mdm:123:old`). This is useful to fetch a unified record id that does not exist anymore after being merged. (required)
      includes - List of relationship property key (included resources) to includes with the response. (optional)
      innerType - The class held by the collection, could be your custom class or Object.
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Throws:
      CliniaRuntimeException - If it fails to process the API call
    • getCollectionResourceAsync

      public <T> CompletableFuture<V1DomainResourceWithIncludes<T>> getCollectionResourceAsync(@Nonnull String partitionKey, @Nonnull String collectionKey, @Nonnull String resourceId, List<String> includes, Class<T> innerType) throws CliniaRuntimeException
      (asynchronously) Retrieves a resource from a data partition.
      Parameters:
      partitionKey - (required)
      collectionKey - (required)
      resourceId - The resource ID. Can also be an identifier with one of the following formats: - `{sourceKey}:{sourceRecordId}:source` (e.g. `mySourceA:123:source`). This is useful to fetch a record when knowing its source record id. - `mdm:{unifiedRecordId}:old` (e.g. `mdm:123:old`). This is useful to fetch a unified record id that does not exist anymore after being merged. (required)
      includes - List of relationship property key (included resources) to includes with the response. (optional)
      innerType - The class held by the collection, could be your custom class or Object.
      Throws:
      CliniaRuntimeException - If it fails to process the API call
    • getCollectionResourceAsync

      public <T> CompletableFuture<V1DomainResourceWithIncludes<T>> getCollectionResourceAsync(@Nonnull String partitionKey, @Nonnull String collectionKey, @Nonnull String resourceId, Class<T> innerType, RequestOptions requestOptions) throws CliniaRuntimeException
      (asynchronously) Retrieves a resource from a data partition.
      Parameters:
      partitionKey - (required)
      collectionKey - (required)
      resourceId - The resource ID. Can also be an identifier with one of the following formats: - `{sourceKey}:{sourceRecordId}:source` (e.g. `mySourceA:123:source`). This is useful to fetch a record when knowing its source record id. - `mdm:{unifiedRecordId}:old` (e.g. `mdm:123:old`). This is useful to fetch a unified record id that does not exist anymore after being merged. (required)
      innerType - The class held by the collection, could be your custom class or Object.
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Throws:
      CliniaRuntimeException - If it fails to process the API call
    • getCollectionResourceAsync

      public <T> CompletableFuture<V1DomainResourceWithIncludes<T>> getCollectionResourceAsync(@Nonnull String partitionKey, @Nonnull String collectionKey, @Nonnull String resourceId, Class<T> innerType) throws CliniaRuntimeException
      (asynchronously) Retrieves a resource from a data partition.
      Parameters:
      partitionKey - (required)
      collectionKey - (required)
      resourceId - The resource ID. Can also be an identifier with one of the following formats: - `{sourceKey}:{sourceRecordId}:source` (e.g. `mySourceA:123:source`). This is useful to fetch a record when knowing its source record id. - `mdm:{unifiedRecordId}:old` (e.g. `mdm:123:old`). This is useful to fetch a unified record id that does not exist anymore after being merged. (required)
      innerType - The class held by the collection, could be your custom class or Object.
      Throws:
      CliniaRuntimeException - If it fails to process the API call
    • getRelationship

      public <T> V1RelationshipWithIncludes<T> getRelationship(@Nonnull String partitionKey, @Nonnull String relationshipType, @Nonnull String relationshipId, List<String> includes, Class<T> innerType, RequestOptions requestOptions) throws CliniaRuntimeException
      Retrieves a relationship from a data partition.
      Parameters:
      partitionKey - (required)
      relationshipType - (required)
      relationshipId - The unique identifier of the relationship with one of the following formats: - v1RelationshipID format: `{fromType}.{fromID},{toType}.{toID}` (e.g. `patient.123,provider.456`). You can optionally pass in the simpler `{fromID},{toID}` form. - Identifier format: `{system}:{value}:{use}` (e.g. `clinia:123:source`). (required)
      includes - List of resource types to includes with the response. Includes must be valid resource types for the given relationship definition. (optional)
      innerType - The class held by the collection, could be your custom class or Object.
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Throws:
      CliniaRuntimeException - If it fails to process the API call
    • getRelationship

      public <T> V1RelationshipWithIncludes<T> getRelationship(@Nonnull String partitionKey, @Nonnull String relationshipType, @Nonnull String relationshipId, List<String> includes, Class<T> innerType) throws CliniaRuntimeException
      Retrieves a relationship from a data partition.
      Parameters:
      partitionKey - (required)
      relationshipType - (required)
      relationshipId - The unique identifier of the relationship with one of the following formats: - v1RelationshipID format: `{fromType}.{fromID},{toType}.{toID}` (e.g. `patient.123,provider.456`). You can optionally pass in the simpler `{fromID},{toID}` form. - Identifier format: `{system}:{value}:{use}` (e.g. `clinia:123:source`). (required)
      includes - List of resource types to includes with the response. Includes must be valid resource types for the given relationship definition. (optional)
      innerType - The class held by the collection, could be your custom class or Object.
      Throws:
      CliniaRuntimeException - If it fails to process the API call
    • getRelationship

      public <T> V1RelationshipWithIncludes<T> getRelationship(@Nonnull String partitionKey, @Nonnull String relationshipType, @Nonnull String relationshipId, Class<T> innerType, RequestOptions requestOptions) throws CliniaRuntimeException
      Retrieves a relationship from a data partition.
      Parameters:
      partitionKey - (required)
      relationshipType - (required)
      relationshipId - The unique identifier of the relationship with one of the following formats: - v1RelationshipID format: `{fromType}.{fromID},{toType}.{toID}` (e.g. `patient.123,provider.456`). You can optionally pass in the simpler `{fromID},{toID}` form. - Identifier format: `{system}:{value}:{use}` (e.g. `clinia:123:source`). (required)
      innerType - The class held by the collection, could be your custom class or Object.
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Throws:
      CliniaRuntimeException - If it fails to process the API call
    • getRelationship

      public <T> V1RelationshipWithIncludes<T> getRelationship(@Nonnull String partitionKey, @Nonnull String relationshipType, @Nonnull String relationshipId, Class<T> innerType) throws CliniaRuntimeException
      Retrieves a relationship from a data partition.
      Parameters:
      partitionKey - (required)
      relationshipType - (required)
      relationshipId - The unique identifier of the relationship with one of the following formats: - v1RelationshipID format: `{fromType}.{fromID},{toType}.{toID}` (e.g. `patient.123,provider.456`). You can optionally pass in the simpler `{fromID},{toID}` form. - Identifier format: `{system}:{value}:{use}` (e.g. `clinia:123:source`). (required)
      innerType - The class held by the collection, could be your custom class or Object.
      Throws:
      CliniaRuntimeException - If it fails to process the API call
    • getRelationshipAsync

      public <T> CompletableFuture<V1RelationshipWithIncludes<T>> getRelationshipAsync(@Nonnull String partitionKey, @Nonnull String relationshipType, @Nonnull String relationshipId, List<String> includes, Class<T> innerType, RequestOptions requestOptions) throws CliniaRuntimeException
      (asynchronously) Retrieves a relationship from a data partition.
      Parameters:
      partitionKey - (required)
      relationshipType - (required)
      relationshipId - The unique identifier of the relationship with one of the following formats: - v1RelationshipID format: `{fromType}.{fromID},{toType}.{toID}` (e.g. `patient.123,provider.456`). You can optionally pass in the simpler `{fromID},{toID}` form. - Identifier format: `{system}:{value}:{use}` (e.g. `clinia:123:source`). (required)
      includes - List of resource types to includes with the response. Includes must be valid resource types for the given relationship definition. (optional)
      innerType - The class held by the collection, could be your custom class or Object.
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Throws:
      CliniaRuntimeException - If it fails to process the API call
    • getRelationshipAsync

      public <T> CompletableFuture<V1RelationshipWithIncludes<T>> getRelationshipAsync(@Nonnull String partitionKey, @Nonnull String relationshipType, @Nonnull String relationshipId, List<String> includes, Class<T> innerType) throws CliniaRuntimeException
      (asynchronously) Retrieves a relationship from a data partition.
      Parameters:
      partitionKey - (required)
      relationshipType - (required)
      relationshipId - The unique identifier of the relationship with one of the following formats: - v1RelationshipID format: `{fromType}.{fromID},{toType}.{toID}` (e.g. `patient.123,provider.456`). You can optionally pass in the simpler `{fromID},{toID}` form. - Identifier format: `{system}:{value}:{use}` (e.g. `clinia:123:source`). (required)
      includes - List of resource types to includes with the response. Includes must be valid resource types for the given relationship definition. (optional)
      innerType - The class held by the collection, could be your custom class or Object.
      Throws:
      CliniaRuntimeException - If it fails to process the API call
    • getRelationshipAsync

      public <T> CompletableFuture<V1RelationshipWithIncludes<T>> getRelationshipAsync(@Nonnull String partitionKey, @Nonnull String relationshipType, @Nonnull String relationshipId, Class<T> innerType, RequestOptions requestOptions) throws CliniaRuntimeException
      (asynchronously) Retrieves a relationship from a data partition.
      Parameters:
      partitionKey - (required)
      relationshipType - (required)
      relationshipId - The unique identifier of the relationship with one of the following formats: - v1RelationshipID format: `{fromType}.{fromID},{toType}.{toID}` (e.g. `patient.123,provider.456`). You can optionally pass in the simpler `{fromID},{toID}` form. - Identifier format: `{system}:{value}:{use}` (e.g. `clinia:123:source`). (required)
      innerType - The class held by the collection, could be your custom class or Object.
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Throws:
      CliniaRuntimeException - If it fails to process the API call
    • getRelationshipAsync

      public <T> CompletableFuture<V1RelationshipWithIncludes<T>> getRelationshipAsync(@Nonnull String partitionKey, @Nonnull String relationshipType, @Nonnull String relationshipId, Class<T> innerType) throws CliniaRuntimeException
      (asynchronously) Retrieves a relationship from a data partition.
      Parameters:
      partitionKey - (required)
      relationshipType - (required)
      relationshipId - The unique identifier of the relationship with one of the following formats: - v1RelationshipID format: `{fromType}.{fromID},{toType}.{toID}` (e.g. `patient.123,provider.456`). You can optionally pass in the simpler `{fromID},{toID}` form. - Identifier format: `{system}:{value}:{use}` (e.g. `clinia:123:source`). (required)
      innerType - The class held by the collection, could be your custom class or Object.
      Throws:
      CliniaRuntimeException - If it fails to process the API call
    • query

      public <T> V1QueryResponse<T> query(@Nonnull String partitionKey, @Nonnull String collectionKey, @Nonnull V1SearchParameters v1SearchParameters, Class<T> innerType, RequestOptions requestOptions) throws CliniaRuntimeException
      Searches resources of a specific collection in the data partition.
      Parameters:
      partitionKey - The partition from which to execute the query. (required)
      collectionKey - The collection from which to execute the query. (required)
      v1SearchParameters - (required)
      innerType - The class held by the collection, could be your custom class or Object.
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Throws:
      CliniaRuntimeException - If it fails to process the API call
    • query

      public <T> V1QueryResponse<T> query(@Nonnull String partitionKey, @Nonnull String collectionKey, @Nonnull V1SearchParameters v1SearchParameters, Class<T> innerType) throws CliniaRuntimeException
      Searches resources of a specific collection in the data partition.
      Parameters:
      partitionKey - The partition from which to execute the query. (required)
      collectionKey - The collection from which to execute the query. (required)
      v1SearchParameters - (required)
      innerType - The class held by the collection, could be your custom class or Object.
      Throws:
      CliniaRuntimeException - If it fails to process the API call
    • queryAsync

      public <T> CompletableFuture<V1QueryResponse<T>> queryAsync(@Nonnull String partitionKey, @Nonnull String collectionKey, @Nonnull V1SearchParameters v1SearchParameters, Class<T> innerType, RequestOptions requestOptions) throws CliniaRuntimeException
      (asynchronously) Searches resources of a specific collection in the data partition.
      Parameters:
      partitionKey - The partition from which to execute the query. (required)
      collectionKey - The collection from which to execute the query. (required)
      v1SearchParameters - (required)
      innerType - The class held by the collection, could be your custom class or Object.
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Throws:
      CliniaRuntimeException - If it fails to process the API call
    • queryAsync

      public <T> CompletableFuture<V1QueryResponse<T>> queryAsync(@Nonnull String partitionKey, @Nonnull String collectionKey, @Nonnull V1SearchParameters v1SearchParameters, Class<T> innerType) throws CliniaRuntimeException
      (asynchronously) Searches resources of a specific collection in the data partition.
      Parameters:
      partitionKey - The partition from which to execute the query. (required)
      collectionKey - The collection from which to execute the query. (required)
      v1SearchParameters - (required)
      innerType - The class held by the collection, could be your custom class or Object.
      Throws:
      CliniaRuntimeException - If it fails to process the API call
    • queryRelationships

      public <T> V1QueryResponse<T> queryRelationships(@Nonnull String partitionKey, @Nonnull String relationshipType, @Nonnull V1SearchParameters v1SearchParameters, Class<T> innerType, RequestOptions requestOptions) throws CliniaRuntimeException
      Searches relationships of a specific type in the data partition.
      Parameters:
      partitionKey - The partition from which to execute the query. (required)
      relationshipType - The relationship type. (required)
      v1SearchParameters - (required)
      innerType - The class held by the collection, could be your custom class or Object.
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Throws:
      CliniaRuntimeException - If it fails to process the API call
    • queryRelationships

      public <T> V1QueryResponse<T> queryRelationships(@Nonnull String partitionKey, @Nonnull String relationshipType, @Nonnull V1SearchParameters v1SearchParameters, Class<T> innerType) throws CliniaRuntimeException
      Searches relationships of a specific type in the data partition.
      Parameters:
      partitionKey - The partition from which to execute the query. (required)
      relationshipType - The relationship type. (required)
      v1SearchParameters - (required)
      innerType - The class held by the collection, could be your custom class or Object.
      Throws:
      CliniaRuntimeException - If it fails to process the API call
    • queryRelationshipsAsync

      public <T> CompletableFuture<V1QueryResponse<T>> queryRelationshipsAsync(@Nonnull String partitionKey, @Nonnull String relationshipType, @Nonnull V1SearchParameters v1SearchParameters, Class<T> innerType, RequestOptions requestOptions) throws CliniaRuntimeException
      (asynchronously) Searches relationships of a specific type in the data partition.
      Parameters:
      partitionKey - The partition from which to execute the query. (required)
      relationshipType - The relationship type. (required)
      v1SearchParameters - (required)
      innerType - The class held by the collection, could be your custom class or Object.
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Throws:
      CliniaRuntimeException - If it fails to process the API call
    • queryRelationshipsAsync

      public <T> CompletableFuture<V1QueryResponse<T>> queryRelationshipsAsync(@Nonnull String partitionKey, @Nonnull String relationshipType, @Nonnull V1SearchParameters v1SearchParameters, Class<T> innerType) throws CliniaRuntimeException
      (asynchronously) Searches relationships of a specific type in the data partition.
      Parameters:
      partitionKey - The partition from which to execute the query. (required)
      relationshipType - The relationship type. (required)
      v1SearchParameters - (required)
      innerType - The class held by the collection, could be your custom class or Object.
      Throws:
      CliniaRuntimeException - If it fails to process the API call
    • searchForFacets

      public SearchForFacets200Response searchForFacets(@Nonnull String partitionKey, @Nonnull String collectionKey, @Nonnull String propertyPath, @Nonnull V1FacetParameters v1FacetParameters, RequestOptions requestOptions) throws CliniaRuntimeException
      Retrieve the facets for a property path in a specific collection in the data partition.
      Parameters:
      partitionKey - The partition from which to execute the search. (required)
      collectionKey - The collection from which to execute the search. (required)
      propertyPath - The property for which the facets are returned. (required)
      v1FacetParameters - (required)
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Throws:
      CliniaRuntimeException - If it fails to process the API call
    • searchForFacets

      public SearchForFacets200Response searchForFacets(@Nonnull String partitionKey, @Nonnull String collectionKey, @Nonnull String propertyPath, @Nonnull V1FacetParameters v1FacetParameters) throws CliniaRuntimeException
      Retrieve the facets for a property path in a specific collection in the data partition.
      Parameters:
      partitionKey - The partition from which to execute the search. (required)
      collectionKey - The collection from which to execute the search. (required)
      propertyPath - The property for which the facets are returned. (required)
      v1FacetParameters - (required)
      Throws:
      CliniaRuntimeException - If it fails to process the API call
    • searchForFacetsAsync

      public CompletableFuture<SearchForFacets200Response> searchForFacetsAsync(@Nonnull String partitionKey, @Nonnull String collectionKey, @Nonnull String propertyPath, @Nonnull V1FacetParameters v1FacetParameters, RequestOptions requestOptions) throws CliniaRuntimeException
      (asynchronously) Retrieve the facets for a property path in a specific collection in the data partition.
      Parameters:
      partitionKey - The partition from which to execute the search. (required)
      collectionKey - The collection from which to execute the search. (required)
      propertyPath - The property for which the facets are returned. (required)
      v1FacetParameters - (required)
      requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
      Throws:
      CliniaRuntimeException - If it fails to process the API call
    • searchForFacetsAsync

      public CompletableFuture<SearchForFacets200Response> searchForFacetsAsync(@Nonnull String partitionKey, @Nonnull String collectionKey, @Nonnull String propertyPath, @Nonnull V1FacetParameters v1FacetParameters) throws CliniaRuntimeException
      (asynchronously) Retrieve the facets for a property path in a specific collection in the data partition.
      Parameters:
      partitionKey - The partition from which to execute the search. (required)
      collectionKey - The collection from which to execute the search. (required)
      propertyPath - The property for which the facets are returned. (required)
      v1FacetParameters - (required)
      Throws:
      CliniaRuntimeException - If it fails to process the API call