Class Attribute
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
Attribute is a java bean used to create schema attributes associated with the external data engine.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
Return a list of alternative names for the attribute.boolean
Return whether the same value can be used by more than one instance of this attribute.Return the data type for this element.Return the default value for the element.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 the stored description property for the schema element.Return the simple name of the schema element.Return the unique identifier of this column's type.Return a fixed literal value - an alternative to default value.boolean
Returns true if the schema element deprecatedboolean
Return whether the field is nullable or not.int
Return the length of the data field.int
Return the maximum number of instances allowed for this attribute.int
Return this minimum number of instances allowed for this attribute.int
Return the minimum length of the data.Return the name of the Java class to use to represent this type.boolean
Return whether the attribute instances are arranged in an order.int
Return the position of this schema attribute in its parent schema.int
Return the number of significant digits to the right of decimal point.Return the order that the attribute instances are arranged in - if any.Return identifier of the type of this schema elementReturn name of the type of this schema elementReturn the set of valid values for this column.int
hashCode()
void
setAliases
(List<String> aliases) Set up a list of alternative names for the attribute.void
setAllowsDuplicateValues
(boolean allowsDuplicateValues) Set up whether the same value can be used by more than one instance of this attribute.void
setDataType
(String dataType) Set up the data type for this element.void
setDefaultValue
(String defaultValue) Set up the default value for the element.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).void
setDescription
(String description) Set up the stored description property for the schema element.void
setDisplayName
(String displayName) Set up the simple name of the schema element.void
setExternalTypeGUID
(String externalTypeGUID) If the type of this column is represented by an external (standard type) put its value here.void
setFixedValue
(String fixedValue) If the column contains a fixed literal value, set this value here - an alternative to default value.void
setIsDeprecated
(boolean isDeprecated) Set whether the schema element deprecated or not.void
setIsNullable
(boolean isNullable) Set up whether the field is nullable or not.void
setLength
(int length) Set up the length of the data field.void
setMaxCardinality
(int maxCardinality) Set up the maximum number of instances allowed for this attribute.void
setMinCardinality
(int minCardinality) Set up the minimum number of instances allowed for this attribute.void
setMinimumLength
(int minimumLength) Set up the minimum length of the data.void
setNativeClass
(String nativeClass) Set up the name of the Java class to use to represent this type.void
setOrderedValues
(boolean orderedValues) Set up whether the attribute instances are arranged in an order.void
setPosition
(int position) Set up the position of this schema attribute in its parent schema.void
setPrecision
(int precision) Set up the number of significant digits to the right of decimal point.void
setSortOrder
(DataItemSortOrder sortOrder) Set up the order that the attribute instances are arranged in - if any.void
setTypeGuid
(String typeGuid) Set the value for the type identifiervoid
setTypeName
(String typeName) Set the name of the type for this schema elementvoid
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.toString()
Methods inherited from class org.odpi.openmetadata.accessservices.dataengine.model.Referenceable
getAdditionalProperties, getQualifiedName, setAdditionalProperties, setQualifiedName
-
Constructor Details
-
Attribute
public Attribute()
-
-
Method Details
-
getDisplayName
Return the simple name of the schema element.- Returns:
- displayName string name
-
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
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
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
Return the name of the Java class to use to represent this type.- Returns:
- fully qualified Java class name
-
getAliases
Return a list of alternative names for the attribute.- Returns:
- list of names
-
getDataType
Return the data type for this element. Null means unknown data type.- Returns:
- string data type name
-
getDefaultValue
Return the default value for the element. Null means no default value set up.- Returns:
- string containing default value
-
getFixedValue
Return a fixed literal value - an alternative to default value.- Returns:
- string value
-
getExternalTypeGUID
Return the unique identifier of this column's type.- Returns:
- unique identifier (guid) of the external schema type
-
getValidValuesSetGUID
Return the set of valid values for this column.- Returns:
- unique identifier (guid) of the valid values set
-
getTypeName
Return name of the type of this schema element- Returns:
- name of the type
-
getTypeGuid
Return identifier of the type of this schema element- Returns:
- identifier of the type for this schema element
-
setDisplayName
Set up the simple name of the schema element.- Parameters:
displayName
- String display name
-
setDescription
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
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
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
Set up the name of the Java class to use to represent this type.- Parameters:
nativeClass
- fully qualified Java class name
-
setAliases
Set up a list of alternative names for the attribute.- Parameters:
aliases
- list of names
-
setDataType
Set up the data type for this element. Null means unknown data type.- Parameters:
dataType
- data type name
-
setDefaultValue
Set up the default value for the element. Null means no default value set up.- Parameters:
defaultValue
- String containing default value
-
setFixedValue
If the column contains a fixed literal value, set this value here - an alternative to default value.- Parameters:
fixedValue
- string
-
setExternalTypeGUID
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
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
Set the name of the type for this schema element- Parameters:
typeName
- the name of the type of data
-
setTypeGuid
Set the value for the type identifier- Parameters:
typeGuid
- unique identifier (guid) of the schema element
-
equals
- Overrides:
equals
in classReferenceable
-
canEqual
- Overrides:
canEqual
in classReferenceable
-
hashCode
public int hashCode()- Overrides:
hashCode
in classReferenceable
-
toString
- Overrides:
toString
in classReferenceable
-