Class TypeDefAttribute
- java.lang.Object
-
- org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefElementHeader
-
- org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefAttribute
-
- All Implemented Interfaces:
Serializable
public class TypeDefAttribute extends TypeDefElementHeader
TypeDefAttribute stores the properties used to describe a attribute within a Classification, Entity or Relationship. The attribute may itself be of types Enum, Collection or Primitive Types.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected StringattributeDescriptionprotected StringattributeDescriptionGUIDprotected StringattributeNameprotected TypeDefAttributeStatusattributeStatusprotected AttributeTypeDefattributeTypeprotected AttributeCardinalitycardinalityprotected StringdefaultValueprotected List<ExternalStandardMapping>externalStandardMappingsprotected booleanisIndexableprotected booleanisUniqueprotected StringreplacedByAttributeprotected intvaluesMaxCountprotected intvaluesMinCount-
Fields inherited from class org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefElementHeader
CURRENT_TYPE_DEF_HEADER_VERSION
-
-
Constructor Summary
Constructors Constructor Description TypeDefAttribute()Default constructor creates an empty TypeDefAttribute.TypeDefAttribute(TypeDefAttribute template)Copy/clone constructor initialized with the values from the supplied template.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object objectToCompare)Verify that supplied object has the same properties.AttributeCardinalitygetAttributeCardinality()Return the cardinality of this attribute.StringgetAttributeDescription()Return the short description of the attribute.StringgetAttributeDescriptionGUID()Return the unique id of the glossary term that describes this attribute (or null if no attribute defined).StringgetAttributeName()Return the name of this attribute.TypeDefAttributeStatusgetAttributeStatus()Return the status of this attribute.AttributeTypeDefgetAttributeType()Return the name of the type for the value in this attribute.StringgetDefaultValue()Return the default value for this attribute.List<ExternalStandardMapping>getExternalStandardMappings()Return the list of mappings to external standards.StringgetReplacedByAttribute()If the attribute has been renamed, this contains the name of the new attribute.intgetValuesMaxCount()Return the maximum number of values for this attribute (relevant for Arrays, Sets and Maps).intgetValuesMinCount()Return the minimum number of values for this attribute (relevant for Arrays, Sets and Maps).inthashCode()Int for hash mapbooleanisIndexable()Return whether this attribute should be included in the metadata collection's search index.booleanisUnique()Return whether the value for this attribute is unique across the specific instances of Struct, Classification, Entity or Relationship types that this attribute included in.voidsetAttributeCardinality(AttributeCardinality attributeCardinality)Set up the cardinality for this attribute.voidsetAttributeDescription(String attributeDescription)Set up the short description of the attribute.voidsetAttributeDescriptionGUID(String attributeDescriptionGUID)Set up the unique id of the glossary term that describes this attribute (or null if no attribute defined).voidsetAttributeName(String attributeName)Set up the name of this attribute.voidsetAttributeStatus(TypeDefAttributeStatus attributeStatus)Set up the status of this attribute.voidsetAttributeType(AttributeTypeDef attributeType)Set up the name of the type for the value in this attribute.voidsetDefaultValue(String defaultValue)Set up the default value for this attribute.voidsetExternalStandardMappings(List<ExternalStandardMapping> externalStandardMappings)Set up the list of mappings to external standards.voidsetIndexable(boolean indexable)Set up the isIndexable flag.voidsetReplacedByAttribute(String replacedByAttribute)If the attribute has been renamed, this contains the name of the new attribute.voidsetUnique(boolean unique)Set up the isUnique flag.voidsetValuesMaxCount(int valuesMaxCount)Set up the maximum number of values for this attribute (relevant for Arrays, Sets and Maps).voidsetValuesMinCount(int valuesMinCount)Set up the minimum number of values for this attribute (relevant for Arrays, Sets and Maps).StringtoString()Standard toString method.-
Methods inherited from class org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefElementHeader
getHeaderVersion, setHeaderVersion
-
-
-
-
Field Detail
-
attributeName
protected String attributeName
-
attributeType
protected AttributeTypeDef attributeType
-
attributeStatus
protected TypeDefAttributeStatus attributeStatus
-
replacedByAttribute
protected String replacedByAttribute
-
attributeDescription
protected String attributeDescription
-
attributeDescriptionGUID
protected String attributeDescriptionGUID
-
cardinality
protected AttributeCardinality cardinality
-
valuesMinCount
protected int valuesMinCount
-
valuesMaxCount
protected int valuesMaxCount
-
isIndexable
protected boolean isIndexable
-
isUnique
protected boolean isUnique
-
defaultValue
protected String defaultValue
-
externalStandardMappings
protected List<ExternalStandardMapping> externalStandardMappings
-
-
Constructor Detail
-
TypeDefAttribute
public TypeDefAttribute()
Default constructor creates an empty TypeDefAttribute.
-
TypeDefAttribute
public TypeDefAttribute(TypeDefAttribute template)
Copy/clone constructor initialized with the values from the supplied template.- Parameters:
template- TypeDefAttribute to copy
-
-
Method Detail
-
getAttributeName
public String getAttributeName()
Return the name of this attribute.- Returns:
- String name
-
setAttributeName
public void setAttributeName(String attributeName)
Set up the name of this attribute.- Parameters:
attributeName- String name
-
getAttributeType
public AttributeTypeDef getAttributeType()
Return the name of the type for the value in this attribute.- Returns:
- AttributeTypeDef definition of attribute type
-
setAttributeType
public void setAttributeType(AttributeTypeDef attributeType)
Set up the name of the type for the value in this attribute.- Parameters:
attributeType- AttributeTypeDef
-
getAttributeStatus
public TypeDefAttributeStatus getAttributeStatus()
Return the status of this attribute.- Returns:
- status (null means ACTIVE)
-
setAttributeStatus
public void setAttributeStatus(TypeDefAttributeStatus attributeStatus)
Set up the status of this attribute.- Parameters:
attributeStatus- status (null means ACTIVE)
-
getReplacedByAttribute
public String getReplacedByAttribute()
If the attribute has been renamed, this contains the name of the new attribute.- Returns:
- new attribute name
-
setReplacedByAttribute
public void setReplacedByAttribute(String replacedByAttribute)
If the attribute has been renamed, this contains the name of the new attribute.- Parameters:
replacedByAttribute- new attribute name
-
getAttributeDescription
public String getAttributeDescription()
Return the short description of the attribute.- Returns:
- String description
-
setAttributeDescription
public void setAttributeDescription(String attributeDescription)
Set up the short description of the attribute.- Parameters:
attributeDescription- String description
-
getAttributeDescriptionGUID
public String getAttributeDescriptionGUID()
Return the unique id of the glossary term that describes this attribute (or null if no attribute defined).- Returns:
- String guid
-
setAttributeDescriptionGUID
public void setAttributeDescriptionGUID(String attributeDescriptionGUID)
Set up the unique id of the glossary term that describes this attribute (or null if no attribute defined).- Parameters:
attributeDescriptionGUID- String guid
-
getAttributeCardinality
public AttributeCardinality getAttributeCardinality()
Return the cardinality of this attribute.- Returns:
- AttributeCardinality Enum.
-
setAttributeCardinality
public void setAttributeCardinality(AttributeCardinality attributeCardinality)
Set up the cardinality for this attribute.- Parameters:
attributeCardinality- enum value
-
getValuesMinCount
public int getValuesMinCount()
Return the minimum number of values for this attribute (relevant for Arrays, Sets and Maps).- Returns:
- int minimum count
-
setValuesMinCount
public void setValuesMinCount(int valuesMinCount)
Set up the minimum number of values for this attribute (relevant for Arrays, Sets and Maps).- Parameters:
valuesMinCount- int minimum count
-
getValuesMaxCount
public int getValuesMaxCount()
Return the maximum number of values for this attribute (relevant for Arrays, Sets and Maps).- Returns:
- int maximum count
-
setValuesMaxCount
public void setValuesMaxCount(int valuesMaxCount)
Set up the maximum number of values for this attribute (relevant for Arrays, Sets and Maps).- Parameters:
valuesMaxCount- int maximum count
-
isUnique
public boolean isUnique()
Return whether the value for this attribute is unique across the specific instances of Struct, Classification, Entity or Relationship types that this attribute included in.- Returns:
- boolean isUnique flag
-
setUnique
public void setUnique(boolean unique)
Set up the isUnique flag. This indicates whether the value for this attribute is unique across the specific instances of Struct, Classification, Entity or Relationship types that this attribute included in.- Parameters:
unique- boolean isUnique flag
-
isIndexable
public boolean isIndexable()
Return whether this attribute should be included in the metadata collection's search index.- Returns:
- boolean isIndexable flag
-
setIndexable
public void setIndexable(boolean indexable)
Set up the isIndexable flag. This indicates whether this attribute should be included in the metadata collection's search index.- Parameters:
indexable- boolean isIndexable flag
-
getDefaultValue
public String getDefaultValue()
Return the default value for this attribute.- Returns:
- String default value
-
setDefaultValue
public void setDefaultValue(String defaultValue)
Set up the default value for this attribute.- Parameters:
defaultValue- String
-
getExternalStandardMappings
public List<ExternalStandardMapping> getExternalStandardMappings()
Return the list of mappings to external standards.- Returns:
- ExternalStandardMappings list
-
setExternalStandardMappings
public void setExternalStandardMappings(List<ExternalStandardMapping> externalStandardMappings)
Set up the list of mappings to external standards.- Parameters:
externalStandardMappings- ExternalStandardMappings list
-
toString
public String toString()
Standard toString method.
-
equals
public boolean equals(Object objectToCompare)
Verify that supplied object has the same properties.
-
-