Class MapPropertyValue
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.MapPropertyValue
- All Implemented Interfaces:
Serializable
MapPropertyValue stores the values of a map within an entity, struct or relationship properties.
The elements of the map are stored in an InstanceProperties map.
- 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 sets the map to empty.MapPropertyValue
(MapPropertyValue template) Copy/clone constructor set up the map using the supplied 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.int
Return the number of elements in the map.Return a copy of the map elements.int
hashCode()
Return a hash code based on the property valuesvoid
setMapValue
(String propertyName, InstancePropertyValue propertyValue) Add or update an element in the map.void
setMapValues
(InstanceProperties mapValues) Set up the map elements in one call.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
-
MapPropertyValue
public MapPropertyValue()Default constructor sets the map to empty. -
MapPropertyValue
Copy/clone constructor set up the map using the supplied template.- Parameters:
template
- ArrayPropertyValue
-
-
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
-
getMapElementCount
public int getMapElementCount()Return the number of elements in the map.- Returns:
- int map size
-
getMapValues
Return a copy of the map elements.- Returns:
- InstanceProperties containing the map elements
-
setMapValue
Add or update an element in the map. If a null is supplied for the property name, an OMRS runtime exception is thrown. If a null is supplied for the property value, the property is removed.- Parameters:
propertyName
- String namepropertyValue
- InstancePropertyValue value to store
-
setMapValues
Set up the map elements in one call.- Parameters:
mapValues
- InstanceProperties containing the array elements
-
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 property values- Overrides:
hashCode
in classInstancePropertyValue
- Returns:
- int hash code
-