Class InstancePropertyValue
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
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ArrayPropertyValue
,EnumPropertyValue
,MapPropertyValue
,PrimitivePropertyValue
,StructPropertyValue
InstancePropertyValue provides a common class for holding an instance type and value.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
Version of the header used in this release -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Default constructor for Jacksonprotected
InstancePropertyValue
(InstancePropertyCategory instancePropertyCategory) Typical constructor initializes the instance property value to nulls.protected
InstancePropertyValue
(InstancePropertyValue template) Copy/clone constructor initializes the instance property value from the supplied template. -
Method Summary
Modifier and TypeMethodDescriptionabstract InstancePropertyValue
Delegate the process of cloning to the subclass.boolean
Validate that an object is equal depending on their stored values.Return the category of this instance property's type.Return the unique GUID for the type.Return the name of the type.int
hashCode()
Return a hash code based on the property valuesprotected <K,
V extends InstancePropertyValue>
Map<K,Object> mapValuesAsObject
(Map<K, V> valMap) Default method for "valueAsString".protected <K,
V extends InstancePropertyValue>
Map<K,String> mapValuesAsString
(Map<K, V> valMap) Default method for "valueAsObject".void
setInstancePropertyCategory
(InstancePropertyCategory instancePropertyCategory) Set up the category for this instance property.void
setTypeGUID
(String typeGUID) Set up the unique GUID of the type.void
setTypeName
(String typeName) Set up the name of the type.toString()
Standard toString method.abstract Object
Return the object version of the value - used for comparisons.abstract String
Return the string version of the value - used for error logging.Methods inherited from class org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.RepositoryElementHeader
getHeaderVersion, setHeaderVersion
-
Field Details
-
CURRENT_INSTANCE_PROPERTY_VALUE_HEADER_VERSION
public static final long CURRENT_INSTANCE_PROPERTY_VALUE_HEADER_VERSIONVersion of the header used in this release- See Also:
-
-
Constructor Details
-
InstancePropertyValue
protected InstancePropertyValue()Default constructor for Jackson -
InstancePropertyValue
Typical constructor initializes the instance property value to nulls.- Parameters:
instancePropertyCategory
- InstancePropertyCategory Enum
-
InstancePropertyValue
Copy/clone constructor initializes the instance property value from the supplied template.- Parameters:
template
- InstancePropertyValue
-
-
Method Details
-
cloneFromSubclass
Delegate the process of cloning to the subclass.- Returns:
- subclass of InstancePropertyValue
-
valueAsString
Return the string version of the value - used for error logging.- Returns:
- string value
-
valueAsObject
Return the object version of the value - used for comparisons.- Returns:
- object value
-
mapValuesAsObject
Default method for "valueAsString". Return the object version of the value - used for comparisons.- Type Parameters:
K
- keyV
- value- Parameters:
valMap
- mapping- Returns:
- Map object values
-
mapValuesAsString
Default method for "valueAsObject". Return the object version of the value - used for comparisons.- Type Parameters:
K
- keyV
- value- Parameters:
valMap
- mapping- Returns:
- Map string values
-
getInstancePropertyCategory
Return the category of this instance property's type.- Returns:
- TypeDefCategory enum value
-
setInstancePropertyCategory
Set up the category for this instance property. This is used on the JSON deserialization.- Parameters:
instancePropertyCategory
- new category
-
getTypeGUID
Return the unique GUID for the type.- Returns:
- String unique identifier
-
setTypeGUID
Set up the unique GUID of the type.- Parameters:
typeGUID
- String unique identifier
-
getTypeName
Return the name of the type.- Returns:
- String type name
-
setTypeName
Set up the name of the type.- Parameters:
typeName
- String type name
-
toString
Standard toString method. -
equals
Validate that an object is equal depending on their stored values.- Overrides:
equals
in classRepositoryElementHeader
- Parameters:
objectToCompare
- object- Returns:
- boolean result
-
hashCode
public int hashCode()Return a hash code based on the property values- Overrides:
hashCode
in classRepositoryElementHeader
- Returns:
- int hash code
-