java.lang.Object
org.odpi.openmetadata.accessservices.dataengine.model.Referenceable
org.odpi.openmetadata.accessservices.dataengine.model.Attribute
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
RelationalColumn

public class Attribute extends Referenceable
Attribute is a java bean used to create schema attributes associated with the external data engine.
See Also:
  • Constructor Details

    • Attribute

      public Attribute()
  • Method Details

    • getDisplayName

      public String getDisplayName()
      Return the simple name of the schema element.
      Returns:
      displayName string name
    • getDescription

      public String getDescription()
      Returns the stored description property for the schema element.
      Returns:
      description string description
    • getIsDeprecated

      public boolean getIsDeprecated()
      Returns true if the schema element deprecated
      Returns:
      isDeprecated boolean flag
    • getPosition

      public int getPosition()
      Return the position of this schema attribute in its parent schema.
      Returns:
      position int position in schema - 0 means first
    • getMinCardinality

      public int getMinCardinality()
      Return this minimum number of instances allowed for this attribute.
      Returns:
      minCardinality int
    • getMaxCardinality

      public int getMaxCardinality()
      Return the maximum number of instances allowed for this attribute.
      Returns:
      maxCardinality int (-1 means infinite)
    • getAllowsDuplicateValues

      public boolean getAllowsDuplicateValues()
      Return whether the same value can be used by more than one instance of this attribute.
      Returns:
      allowsDuplicateValues boolean flag
    • getOrderedValues

      public boolean getOrderedValues()
      Return whether the attribute instances are arranged in an order.
      Returns:
      orderedValues boolean flag
    • getDefaultValueOverride

      public String getDefaultValueOverride()
      Return any default value for this attribute that would override the default defined in the schema element for this attribute's type (note only used is type is primitive).
      Returns:
      String default value override
    • getSortOrder

      public DataItemSortOrder getSortOrder()
      Return the order that the attribute instances are arranged in - if any.
      Returns:
      DataItemSortOrder enum
    • getMinimumLength

      public int getMinimumLength()
      Return the minimum length of the data.
      Returns:
      int
    • getLength

      public int getLength()
      Return the length of the data field.
      Returns:
      int
    • getPrecision

      public int getPrecision()
      Return the number of significant digits to the right of decimal point.
      Returns:
      int
    • getIsNullable

      public boolean getIsNullable()
      Return whether the field is nullable or not.
      Returns:
      boolean
    • getNativeClass

      public String getNativeClass()
      Return the name of the Java class to use to represent this type.
      Returns:
      fully qualified Java class name
    • getAliases

      public List<String> getAliases()
      Return a list of alternative names for the attribute.
      Returns:
      list of names
    • getDataType

      public String getDataType()
      Return the data type for this element. Null means unknown data type.
      Returns:
      string data type name
    • getDefaultValue

      public String getDefaultValue()
      Return the default value for the element. Null means no default value set up.
      Returns:
      string containing default value
    • getFixedValue

      public String getFixedValue()
      Return a fixed literal value - an alternative to default value.
      Returns:
      string value
    • getExternalTypeGUID

      public String getExternalTypeGUID()
      Return the unique identifier of this column's type.
      Returns:
      unique identifier (guid) of the external schema type
    • getValidValuesSetGUID

      public String getValidValuesSetGUID()
      Return the set of valid values for this column.
      Returns:
      unique identifier (guid) of the valid values set
    • getTypeName

      public String getTypeName()
      Return name of the type of this schema element
      Returns:
      name of the type
    • getTypeGuid

      public String getTypeGuid()
      Return identifier of the type of this schema element
      Returns:
      identifier of the type for this schema element
    • setDisplayName

      public void setDisplayName(String displayName)
      Set up the simple name of the schema element.
      Parameters:
      displayName - String display name
    • setDescription

      public void setDescription(String description)
      Set up the stored description property for the schema element.
      Parameters:
      description - string description
    • setIsDeprecated

      public void setIsDeprecated(boolean isDeprecated)
      Set whether the schema element deprecated or not. Default is false.
      Parameters:
      isDeprecated - boolean flag
    • setPosition

      public void setPosition(int position)
      Set up the position of this schema attribute in its parent schema.
      Parameters:
      position - int position in schema - 0 means first
    • setMinCardinality

      public void setMinCardinality(int minCardinality)
      Set up the minimum number of instances allowed for this attribute.
      Parameters:
      minCardinality - int
    • setMaxCardinality

      public void setMaxCardinality(int maxCardinality)
      Set up the maximum number of instances allowed for this attribute.
      Parameters:
      maxCardinality - int (-1 means infinite)
    • setAllowsDuplicateValues

      public void setAllowsDuplicateValues(boolean allowsDuplicateValues)
      Set up whether the same value can be used by more than one instance of this attribute.
      Parameters:
      allowsDuplicateValues - boolean flag
    • setOrderedValues

      public void setOrderedValues(boolean orderedValues)
      Set up whether the attribute instances are arranged in an order.
      Parameters:
      orderedValues - boolean flag
    • setDefaultValueOverride

      public void setDefaultValueOverride(String defaultValueOverride)
      Set up any default value for this attribute that would override the default defined in the schema element for this attribute's type (note only used is type is primitive).
      Parameters:
      defaultValueOverride - String default value override
    • setSortOrder

      public void setSortOrder(DataItemSortOrder sortOrder)
      Set up the order that the attribute instances are arranged in - if any.
      Parameters:
      sortOrder - DataItemSortOrder enum
    • setMinimumLength

      public void setMinimumLength(int minimumLength)
      Set up the minimum length of the data.
      Parameters:
      minimumLength - int
    • setLength

      public void setLength(int length)
      Set up the length of the data field.
      Parameters:
      length - int
    • setPrecision

      public void setPrecision(int precision)
      Set up the number of significant digits to the right of decimal point.
      Parameters:
      precision - int
    • setIsNullable

      public void setIsNullable(boolean isNullable)
      Set up whether the field is nullable or not.
      Parameters:
      isNullable - boolean
    • setNativeClass

      public void setNativeClass(String nativeClass)
      Set up the name of the Java class to use to represent this type.
      Parameters:
      nativeClass - fully qualified Java class name
    • setAliases

      public void setAliases(List<String> aliases)
      Set up a list of alternative names for the attribute.
      Parameters:
      aliases - list of names
    • setDataType

      public void setDataType(String dataType)
      Set up the data type for this element. Null means unknown data type.
      Parameters:
      dataType - data type name
    • setDefaultValue

      public void setDefaultValue(String defaultValue)
      Set up the default value for the element. Null means no default value set up.
      Parameters:
      defaultValue - String containing default value
    • setFixedValue

      public void setFixedValue(String fixedValue)
      If the column contains a fixed literal value, set this value here - an alternative to default value.
      Parameters:
      fixedValue - string
    • setExternalTypeGUID

      public void setExternalTypeGUID(String externalTypeGUID)
      If the type of this column is represented by an external (standard type) put its value here. No need to set dataType, FixedType or defaultType
      Parameters:
      externalTypeGUID - unique identifier (guid) of the external schema type
    • setValidValuesSetGUID

      public void setValidValuesSetGUID(String validValuesSetGUID)
      If the type is controlled by a fixed set of values, set up the unique identifier of the valid values set that lists the valid values.
      Parameters:
      validValuesSetGUID - unique identifier (guid) of the valid values set
    • setTypeName

      public void setTypeName(String typeName)
      Set the name of the type for this schema element
      Parameters:
      typeName - the name of the type of data
    • setTypeGuid

      public void setTypeGuid(String typeGuid)
      Set the value for the type identifier
      Parameters:
      typeGuid - unique identifier (guid) of the schema element
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Referenceable
    • canEqual

      protected boolean canEqual(Object other)
      Overrides:
      canEqual in class Referenceable
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Referenceable
    • toString

      public String toString()
      Overrides:
      toString in class Referenceable