Class PropertyValue
- java.lang.Object
-
- org.odpi.openmetadata.frameworks.governanceaction.search.PropertyValue
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ArrayPropertyValue,EnumPropertyValue,MapPropertyValue,PrimitivePropertyValue,StructPropertyValue
public abstract class PropertyValue extends Object implements Serializable
PropertyValue provides a common class for holding an instance type and value.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPropertyValue()Default constructor for JacksonprotectedPropertyValue(PropertyValue 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 PropertyValuecloneFromSubclass()Delegate the process of cloning to the subclass.booleanequals(Object objectToCompare)Validate that an object is equal depending on their stored values.StringgetTypeName()Return the name of the type.inthashCode()Return a hash code based on the property valuesprotected <K,V extends PropertyValue>
Map<K,Object>mapValuesAsObject(Map<K,V> valMap)Default method for "valueAsString".protected <K,V extends PropertyValue>
Map<K,String>mapValuesAsString(Map<K,V> valMap)Default method for "valueAsObject".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.
-
-
-
Constructor Detail
-
PropertyValue
protected PropertyValue()
Default constructor for Jackson
-
PropertyValue
protected PropertyValue(PropertyValue template)
Copy/clone constructor initializes the instance property value from the supplied template.- Parameters:
template- PropertyValue
-
-
Method Detail
-
cloneFromSubclass
public abstract PropertyValue cloneFromSubclass()
Delegate the process of cloning to the subclass.- Returns:
- subclass of PropertyValue
-
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 PropertyValue> 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 PropertyValue> 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
-
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.
-
-