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
An EnumPropertyValue stores the value for an enum property.
- See Also:
-
Field Summary
Fields inherited from class org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstancePropertyValue
CURRENT_INSTANCE_PROPERTY_VALUE_HEADER_VERSION
-
Constructor Summary
ConstructorDescriptionDefault constructor initializes an empty enum valueEnumPropertyValue
(EnumPropertyValue template) Copy/clone constructor initializes the enum with the values from the template. -
Method Summary
Modifier and TypeMethodDescriptionDelegate the process of cloning to the subclass.boolean
Validate that an object is equal depending on their stored values.Return the description for this enum.int
Return the integer ordinal for this enum.Return the symbolic name for this enum value.int
hashCode()
Return a hash code based on the values of this object.void
setDescription
(String description) Set up the description for this enum.void
setOrdinal
(int ordinal) Set the integer ordinal for this enum.void
setSymbolicName
(String symbolicName) Set up the symbolic name for this enum value.toString()
Standard toString method.Return the object version of the value - used for comparisons.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 Details
-
EnumPropertyValue
public EnumPropertyValue()Default constructor initializes an empty enum value -
EnumPropertyValue
Copy/clone constructor initializes the enum with the values from the template.- Parameters:
template
- EnumPropertyValue to copy
-
-
Method Details
-
cloneFromSubclass
Delegate the process of cloning to the subclass.- Specified by:
cloneFromSubclass
in classInstancePropertyValue
- Returns:
- subclass of InstancePropertyValue
-
valueAsString
Return the string version of the value - used for error logging.- Specified by:
valueAsString
in classInstancePropertyValue
- Returns:
- string value
-
valueAsObject
Return the object version of the value - used for comparisons.- Specified by:
valueAsObject
in 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
Return the symbolic name for this enum value.- Returns:
- String symbolic name
-
setSymbolicName
Set up the symbolic name for this enum value.- Parameters:
symbolicName
- String symbolic name
-
getDescription
Return the description for this enum.- Returns:
- String description
-
setDescription
Set up the description for this enum.- Parameters:
description
- String description
-
toString
Standard toString method.- Overrides:
toString
in classInstancePropertyValue
- Returns:
- JSON style description of variables.
-
equals
Validate that an object is equal depending on their stored values.- Overrides:
equals
in classInstancePropertyValue
- Parameters:
objectToCompare
- object- Returns:
- boolean result
-
hashCode
public int hashCode()Return a hash code based on the values of this object.- Overrides:
hashCode
in classInstancePropertyValue
- Returns:
- in hash code
-