Package org.apache.gravitino.client
Class GenericColumn
java.lang.Object
org.apache.gravitino.client.GenericColumn
- All Implemented Interfaces:
Column
,SupportsTags
Represents a generic column.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.gravitino.rel.Column
Column.ColumnImpl
-
Field Summary
Fields inherited from interface org.apache.gravitino.rel.Column
DEFAULT_VALUE_NOT_SET, DEFAULT_VALUE_OF_CURRENT_TIMESTAMP
-
Method Summary
Modifier and TypeMethodDescriptionString[]
associateTags
(String[] tagsToAdd, String[] tagsToRemove) Associate tags to the specific object.boolean
comment()
dataType()
boolean
Get a tag by its name for the specific object.int
hashCode()
String[]
listTags()
List all the tag names for the specific object.Tag[]
List all the tags with details for the specific object.name()
boolean
nullable()
-
Method Details
-
supportsTags
- Specified by:
supportsTags
in interfaceColumn
- Returns:
- the
SupportsTags
if the column supports tag operations.
-
listTags
Description copied from interface:SupportsTags
List all the tag names for the specific object.- Specified by:
listTags
in interfaceSupportsTags
- Returns:
- The list of tag names.
-
listTagsInfo
Description copied from interface:SupportsTags
List all the tags with details for the specific object.- Specified by:
listTagsInfo
in interfaceSupportsTags
- Returns:
- The list of tags.
-
getTag
Description copied from interface:SupportsTags
Get a tag by its name for the specific object.- Specified by:
getTag
in interfaceSupportsTags
- 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 throwTagAlreadyAssociatedException
- Specified by:
associateTags
in interfaceSupportsTags
- 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
-
dataType
-
comment
-
nullable
public boolean nullable() -
autoIncrement
public boolean autoIncrement()- Specified by:
autoIncrement
in interfaceColumn
- Returns:
- True if this column is an auto-increment column. Default is false.
-
defaultValue
- Specified by:
defaultValue
in interfaceColumn
- Returns:
- The default value of this column,
Column.DEFAULT_VALUE_NOT_SET
if not specified
-
equals
-
hashCode
public int hashCode()
-