Class GenericColumn

java.lang.Object
org.apache.gravitino.client.GenericColumn
All Implemented Interfaces:
Column, SupportsTags

public class GenericColumn extends Object implements Column, SupportsTags
Represents a generic column.
  • Method Details

    • supportsTags

      public SupportsTags supportsTags()
      Specified by:
      supportsTags in interface Column
      Returns:
      the SupportsTags if the column supports tag operations.
    • listTags

      public String[] listTags()
      Description copied from interface: SupportsTags
      List all the tag names for the specific object.
      Specified by:
      listTags in interface SupportsTags
      Returns:
      The list of tag names.
    • listTagsInfo

      public Tag[] listTagsInfo()
      Description copied from interface: SupportsTags
      List all the tags with details for the specific object.
      Specified by:
      listTagsInfo in interface SupportsTags
      Returns:
      The list of tags.
    • getTag

      public Tag getTag(String name) throws NoSuchTagException
      Description copied from interface: SupportsTags
      Get a tag by its name for the specific object.
      Specified by:
      getTag in interface SupportsTags
      Parameters:
      name - The name of the tag.
      Returns:
      The tag.
      Throws:
      NoSuchTagException - If the tag does not associate with the object.
    • associateTags

      public String[] associateTags(String[] tagsToAdd, String[] tagsToRemove) throws TagAlreadyAssociatedException
      Description copied from interface: SupportsTags
      Associate tags to the specific object. The tagsToAdd will be added to the object, and the tagsToRemove will be removed from the object. Note that: 1) Adding or removing tags that are not existed will be ignored. 2) If the same name tag is in both tagsToAdd and tagsToRemove, it will be ignored. 3) If the tag is already associated with the object, it will throw TagAlreadyAssociatedException
      Specified by:
      associateTags in interface SupportsTags
      Parameters:
      tagsToAdd - The arrays of tag name to be added to the object.
      tagsToRemove - The array of tag name to be removed from the object.
      Returns:
      The array of tag names that are associated with the object.
      Throws:
      TagAlreadyAssociatedException - If the tag is already associated with the object.
    • name

      public String name()
      Specified by:
      name in interface Column
      Returns:
      The name of this column.
    • dataType

      public Type dataType()
      Specified by:
      dataType in interface Column
      Returns:
      The data type of this column.
    • comment

      public String comment()
      Specified by:
      comment in interface Column
      Returns:
      The comment of this column, null if not specified.
    • nullable

      public boolean nullable()
      Specified by:
      nullable in interface Column
      Returns:
      True if this column may produce null values. Default is true.
    • autoIncrement

      public boolean autoIncrement()
      Specified by:
      autoIncrement in interface Column
      Returns:
      True if this column is an auto-increment column. Default is false.
    • defaultValue

      public Expression defaultValue()
      Specified by:
      defaultValue in interface Column
      Returns:
      The default value of this column, Column.DEFAULT_VALUE_NOT_SET if not specified
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object