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
public abstract class InstancePropertyValue extends InstanceElementHeader
InstancePropertyValue provides a common class for holding an instance type and value.- 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 Modifier Constructor Description protectedInstancePropertyValue()Default constructor for JacksonprotectedInstancePropertyValue(InstancePropertyCategory instancePropertyCategory)Typical constructor initializes the instance property value to nulls.protectedInstancePropertyValue(InstancePropertyValue template)Copy/clone constructor initializes the instance property value from the supplied template.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract InstancePropertyValuecloneFromSubclass()Delegate the process of cloning to the subclass.booleanequals(Object objectToCompare)Validate that an object is equal depending on their stored values.InstancePropertyCategorygetInstancePropertyCategory()Return the category of this instance property's type.StringgetTypeGUID()Return the unique GUID for the type.StringgetTypeName()Return the name of the type.inthashCode()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".voidsetInstancePropertyCategory(InstancePropertyCategory instancePropertyCategory)Set up the category for this instance property.voidsetTypeGUID(String typeGUID)Set up the unique GUID of the type.voidsetTypeName(String typeName)Set up the name of the type.StringtoString()Standard toString method.abstract ObjectvalueAsObject()Return the object version of the value - used for comparisons.abstract StringvalueAsString()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
-
-
-
-
Constructor Detail
-
InstancePropertyValue
protected InstancePropertyValue()
Default constructor for Jackson
-
InstancePropertyValue
protected InstancePropertyValue(InstancePropertyCategory instancePropertyCategory)
Typical constructor initializes the instance property value to nulls.- Parameters:
instancePropertyCategory- InstancePropertyCategory Enum
-
InstancePropertyValue
protected InstancePropertyValue(InstancePropertyValue template)
Copy/clone constructor initializes the instance property value from the supplied template.- Parameters:
template- InstancePropertyValue
-
-
Method Detail
-
cloneFromSubclass
public abstract InstancePropertyValue cloneFromSubclass()
Delegate the process of cloning to the subclass.- Returns:
- subclass of InstancePropertyValue
-
valueAsString
public abstract String valueAsString()
Return the string version of the value - used for error logging.- Returns:
- string value
-
valueAsObject
public abstract Object valueAsObject()
Return the object version of the value - used for comparisons.- Returns:
- object value
-
mapValuesAsObject
protected <K,V extends InstancePropertyValue> Map<K,Object> mapValuesAsObject(Map<K,V> valMap)
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
protected <K,V extends InstancePropertyValue> Map<K,String> mapValuesAsString(Map<K,V> valMap)
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
public InstancePropertyCategory getInstancePropertyCategory()
Return the category of this instance property's type.- Returns:
- TypeDefCategory enum value
-
setInstancePropertyCategory
public void setInstancePropertyCategory(InstancePropertyCategory instancePropertyCategory)
Set up the category for this instance property. This is used on the JSON deserialization.- Parameters:
instancePropertyCategory- new category
-
getTypeGUID
public String getTypeGUID()
Return the unique GUID for the type.- Returns:
- String unique identifier
-
setTypeGUID
public void setTypeGUID(String typeGUID)
Set up the unique GUID of the type.- Parameters:
typeGUID- String unique identifier
-
getTypeName
public String getTypeName()
Return the name of the type.- Returns:
- String type name
-
setTypeName
public void setTypeName(String typeName)
Set up the name of the type.- Parameters:
typeName- String type name
-
toString
public String toString()
Standard toString method.
-
equals
public boolean equals(Object objectToCompare)
Validate that an object is equal depending on their stored values.
-
-