Class EnumPropertyValue
- java.lang.Object
-
- org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.RepositoryElementHeader
-
- org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceElementHeader
-
- org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstancePropertyValue
-
- org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EnumPropertyValue
-
- All Implemented Interfaces:
Serializable
public class EnumPropertyValue extends InstancePropertyValue
An EnumPropertyValue stores the value for an enum property.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceElementHeader
CURRENT_INSTANCE_HEADER_VERSION
-
-
Constructor Summary
Constructors Constructor Description EnumPropertyValue()Default constructor initializes an empty enum valueEnumPropertyValue(EnumPropertyValue template)Copy/clone constructor initializes the enum with the values from the template.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InstancePropertyValuecloneFromSubclass()Delegate the process of cloning to the subclass.booleanequals(Object objectToCompare)Validate that an object is equal depending on their stored values.StringgetDescription()Return the description for this enum.intgetOrdinal()Return the integer ordinal for this enum.StringgetSymbolicName()Return the symbolic name for this enum value.inthashCode()Return a hash code based on the values of this object.voidsetDescription(String description)Set up the description for this enum.voidsetOrdinal(int ordinal)Set the integer ordinal for this enum.voidsetSymbolicName(String symbolicName)Set up the symbolic name for this enum value.StringtoString()Standard toString method.ObjectvalueAsObject()Return the object version of the value - used for comparisons.StringvalueAsString()Return the string version of the value - used for error logging.-
Methods inherited from class org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstancePropertyValue
getInstancePropertyCategory, getTypeGUID, getTypeName, mapValuesAsObject, mapValuesAsString, setInstancePropertyCategory, setTypeGUID, setTypeName
-
Methods inherited from class org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.RepositoryElementHeader
getHeaderVersion, setHeaderVersion
-
-
-
-
Constructor Detail
-
EnumPropertyValue
public EnumPropertyValue()
Default constructor initializes an empty enum value
-
EnumPropertyValue
public EnumPropertyValue(EnumPropertyValue template)
Copy/clone constructor initializes the enum with the values from the template.- Parameters:
template- EnumPropertyValue to copy
-
-
Method Detail
-
cloneFromSubclass
public InstancePropertyValue cloneFromSubclass()
Delegate the process of cloning to the subclass.- Specified by:
cloneFromSubclassin classInstancePropertyValue- Returns:
- subclass of InstancePropertyValue
-
valueAsString
public String valueAsString()
Return the string version of the value - used for error logging.- Specified by:
valueAsStringin classInstancePropertyValue- Returns:
- string value
-
valueAsObject
public Object valueAsObject()
Return the object version of the value - used for comparisons.- Specified by:
valueAsObjectin classInstancePropertyValue- Returns:
- object value
-
getOrdinal
public int getOrdinal()
Return the integer ordinal for this enum.- Returns:
- int ordinal
-
setOrdinal
public void setOrdinal(int ordinal)
Set the integer ordinal for this enum.- Parameters:
ordinal- int
-
getSymbolicName
public String getSymbolicName()
Return the symbolic name for this enum value.- Returns:
- String symbolic name
-
setSymbolicName
public void setSymbolicName(String symbolicName)
Set up the symbolic name for this enum value.- Parameters:
symbolicName- String symbolic name
-
getDescription
public String getDescription()
Return the description for this enum.- Returns:
- String description
-
setDescription
public void setDescription(String description)
Set up the description for this enum.- Parameters:
description- String description
-
toString
public String toString()
Standard toString method.- Overrides:
toStringin classInstancePropertyValue- Returns:
- JSON style description of variables.
-
equals
public boolean equals(Object objectToCompare)
Validate that an object is equal depending on their stored values.- Overrides:
equalsin classInstancePropertyValue- Parameters:
objectToCompare- object- Returns:
- boolean result
-
hashCode
public int hashCode()
Return a hash code based on the values of this object.- Overrides:
hashCodein classInstancePropertyValue- Returns:
- in hash code
-
-