Class CustomMetadataField

All Implemented Interfaces:
ISearchable

public class CustomMetadataField extends SearchableField
Utility class to simplify searching for values on custom metadata attributes.
  • Field Summary

    Fields inherited from interface com.atlan.model.fields.ISearchable

    EMBEDDED_SOURCE_VALUE
  • Constructor Summary

    Constructors
    Constructor
    Description
    CustomMetadataField(AtlanClient client, String setName, String attributeName)
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends Number>
    co.elastic.clients.elasticsearch._types.query_dsl.Query
    between(T min, T max)
    Returns a query that will match all assets whose custom metadata attribute has a value between the minimum and maximum specified values, inclusive.
    co.elastic.clients.elasticsearch._types.query_dsl.Query
    eq(boolean value)
    Returns a query that will match all assets whose custom metadata attribute has a value that exactly equals the provided boolean value.
    co.elastic.clients.elasticsearch._types.query_dsl.Query
    eq(AtlanEnum value)
    Returns a query that will match all assets whose custom metadata attribute has a value that exactly equals the provided enumerated value.
    co.elastic.clients.elasticsearch._types.query_dsl.Query
    eq(String value, boolean caseInsensitive)
    Returns a query that will match all assets whose custom metadata attribute has a value that exactly equals the provided string value.
    <T extends Number>
    co.elastic.clients.elasticsearch._types.query_dsl.Query
    eq(T value)
    Returns a query that will match all assets whose custom metadata attribute has a value that exactly matches the provided numeric value.
     
     
    Retrieve the name of the field as it can be searched.
     
    <T extends Number>
    co.elastic.clients.elasticsearch._types.query_dsl.Query
    gt(T value)
    Returns a query that will match all assets whose custom metadata attribute has a value that is strictly greater than the provided numeric value.
    <T extends Number>
    co.elastic.clients.elasticsearch._types.query_dsl.Query
    gte(T value)
    Returns a query that will match all assets whose provided field has a value that is greater than or equal to the provided numeric value.
    co.elastic.clients.elasticsearch._types.query_dsl.Query
    in(Collection<String> values)
    Returns a query that will match all assets whose custom metadata attribute has a value that exactly equals at least one of the provided string values.
    <T extends Number>
    co.elastic.clients.elasticsearch._types.query_dsl.Query
    lt(T value)
    Returns a query that will match all assets whose custom metadata attribute has a value that is strictly less than the provided numeric value.
    <T extends Number>
    co.elastic.clients.elasticsearch._types.query_dsl.Query
    lte(T value)
    Returns a query that will match all assets whose custom metadata attribute has a value that is less than or equal to the provided numeric value.
    co.elastic.clients.elasticsearch._types.query_dsl.Query
    match(String value)
    Returns a query that will textually match the provided value against the field.
    of(AtlanClient client, String set, String attr)
    Factory method shortcut to the default constructor.
    co.elastic.clients.elasticsearch._types.query_dsl.Query
    startsWith(String value, boolean caseInsensitive)
    Returns a query that will match all assets whose custom metadata attribute has a value that starts with the provided value.

    Methods inherited from class com.atlan.model.fields.SearchableField

    bucketBy, bucketBy, count, distinct, distinct, getElasticFieldName, hasAnyValue, order

    Methods inherited from class com.atlan.model.fields.AtlanField

    getAtlanFieldName

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface com.atlan.model.fields.ISearchable

    bucketBy, bucketBy
  • Constructor Details

    • CustomMetadataField

      public CustomMetadataField(AtlanClient client, String setName, String attributeName) throws AtlanException
      Default constructor.
      Parameters:
      client - connectivity to Atlan tenant with the custom metadata
      setName - human-readable name of the custom metadata set
      attributeName - human-readable name of the custom metadata attribute
      Throws:
      AtlanException - on any issues communicating with the API, or if the custom metadata (attribute) does not exist
  • Method Details

    • of

      public static CustomMetadataField of(AtlanClient client, String set, String attr) throws AtlanException
      Factory method shortcut to the default constructor.
      Parameters:
      client - connectivity to Atlan tenant with the custom metadata
      set - human-readable name of the custom metadata set
      attr - human-readable name of the custom metadata attribute
      Throws:
      AtlanException - on any issues communicating with the API, or if the custom metadata (attribute) does not exist
    • getSearchableFieldName

      public String getSearchableFieldName()
      Retrieve the name of the field as it can be searched.
    • startsWith

      public co.elastic.clients.elasticsearch._types.query_dsl.Query startsWith(String value, boolean caseInsensitive) throws InvalidRequestException
      Returns a query that will match all assets whose custom metadata attribute has a value that starts with the provided value.
      Parameters:
      value - the value (prefix) to check the field's value starts with
      caseInsensitive - if true will match the value irrespective of case, otherwise will be a case-sensitive match
      Returns:
      a query that will only match assets whose value for the field starts with the value provided
      Throws:
      InvalidRequestException - if the custom metadata field is not string-comparable
    • eq

      public co.elastic.clients.elasticsearch._types.query_dsl.Query eq(AtlanEnum value) throws InvalidRequestException
      Returns a query that will match all assets whose custom metadata attribute has a value that exactly equals the provided enumerated value.
      Parameters:
      value - the value (enumerated) to check the field's value is exactly equal to
      Returns:
      a query that will only match assets whose value for the field is exactly equal to the enumerated value provided
      Throws:
      InvalidRequestException - if the custom metadata field is not string-comparable
    • eq

      public co.elastic.clients.elasticsearch._types.query_dsl.Query eq(boolean value) throws InvalidRequestException
      Returns a query that will match all assets whose custom metadata attribute has a value that exactly equals the provided boolean value.
      Parameters:
      value - the value (boolean) to check the field's value is exactly equal to
      Returns:
      a query that will only match assets whose value for the field is exactly equal to the boolean value provided
      Throws:
      InvalidRequestException - if the custom metadata field is not boolean-comparable
    • eq

      public co.elastic.clients.elasticsearch._types.query_dsl.Query eq(String value, boolean caseInsensitive) throws InvalidRequestException
      Returns a query that will match all assets whose custom metadata attribute has a value that exactly equals the provided string value. Note that this can also be modified to ignore case when doing the exact match.
      Parameters:
      value - the value (string) to check the field's value is exactly equal to
      caseInsensitive - if true will match the value irrespective of case, otherwise will be a case-sensitive match
      Returns:
      a query that will only match assets whose value for the field is exactly equal to the string value provided (optionally case-insensitive)
      Throws:
      InvalidRequestException - if the custom metadata field is not string-comparable
    • in

      public co.elastic.clients.elasticsearch._types.query_dsl.Query in(Collection<String> values) throws InvalidRequestException
      Returns a query that will match all assets whose custom metadata attribute has a value that exactly equals at least one of the provided string values.
      Parameters:
      values - the values (strings) to check the field's value is exactly equal to
      Returns:
      a query that will only match assets whose value for the field is exactly equal to at least one of the string values provided
      Throws:
      InvalidRequestException - if the custom metadata field is not string-comparable
    • eq

      public <T extends Number> co.elastic.clients.elasticsearch._types.query_dsl.Query eq(T value) throws InvalidRequestException
      Returns a query that will match all assets whose custom metadata attribute has a value that exactly matches the provided numeric value.
      Type Parameters:
      T - numeric values
      Parameters:
      value - the numeric value to exactly match
      Returns:
      a query that will only match assets whose value for the field is exactly the numeric value provided
      Throws:
      InvalidRequestException - if the custom metadata field is not numerically-comparable
    • gt

      public <T extends Number> co.elastic.clients.elasticsearch._types.query_dsl.Query gt(T value) throws InvalidRequestException
      Returns a query that will match all assets whose custom metadata attribute has a value that is strictly greater than the provided numeric value.
      Type Parameters:
      T - numeric values
      Parameters:
      value - the numeric value to compare against
      Returns:
      a query that will only match assets whose value for the field is strictly greater than the numeric value provided
      Throws:
      InvalidRequestException - if the custom metadata field is not numerically-comparable
    • gte

      public <T extends Number> co.elastic.clients.elasticsearch._types.query_dsl.Query gte(T value) throws InvalidRequestException
      Returns a query that will match all assets whose provided field has a value that is greater than or equal to the provided numeric value.
      Type Parameters:
      T - numeric values
      Parameters:
      value - the numeric value to compare against
      Returns:
      a query that will only match assets whose value for the field is greater than or equal to the numeric value provided
      Throws:
      InvalidRequestException - if the custom metadata field is not numerically-comparable
    • lt

      public <T extends Number> co.elastic.clients.elasticsearch._types.query_dsl.Query lt(T value) throws InvalidRequestException
      Returns a query that will match all assets whose custom metadata attribute has a value that is strictly less than the provided numeric value.
      Type Parameters:
      T - numeric values
      Parameters:
      value - the numeric value to compare against
      Returns:
      a query that will only match assets whose value for the field is strictly less than the numeric value provided
      Throws:
      InvalidRequestException - if the custom metadata field is not numerically-comparable
    • lte

      public <T extends Number> co.elastic.clients.elasticsearch._types.query_dsl.Query lte(T value) throws InvalidRequestException
      Returns a query that will match all assets whose custom metadata attribute has a value that is less than or equal to the provided numeric value.
      Type Parameters:
      T - numeric values
      Parameters:
      value - the numeric value to compare against
      Returns:
      a query that will only match assets whose value for the field is less than or equal to the numeric value provided
      Throws:
      InvalidRequestException - if the custom metadata field is not numerically-comparable
    • between

      public <T extends Number> co.elastic.clients.elasticsearch._types.query_dsl.Query between(T min, T max) throws InvalidRequestException
      Returns a query that will match all assets whose custom metadata attribute has a value between the minimum and maximum specified values, inclusive.
      Type Parameters:
      T - numeric values
      Parameters:
      min - minimum value of the field that will match (inclusive)
      max - maximum value of the field that will match (inclusive)
      Returns:
      a query that will only match assets whose value for the field is between the min and max (both inclusive)
      Throws:
      InvalidRequestException - if the custom metadata field is not numerically-comparable
    • match

      public co.elastic.clients.elasticsearch._types.query_dsl.Query match(String value) throws InvalidRequestException
      Returns a query that will textually match the provided value against the field. This analyzes the provided value according to the same analysis carried out on the field (for example, tokenization, stemming, and so on).
      Parameters:
      value - the string value to match against
      Returns:
      a query that will only match assets whose analyzed value for the field matches the value provided (which will also be analyzed)
      Throws:
      InvalidRequestException - if the custom metadata field is not numerically-comparable
    • getSetName

      public String getSetName()
    • getAttributeName

      public String getAttributeName()
    • getAttributeDef

      public AttributeDef getAttributeDef()