Class ArrayPropertyValue
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.ArrayPropertyValue
- All Implemented Interfaces:
Serializable
ArrayPropertyValue stores the values of an array within an entity or relationship properties.
The elements of the array are stored in an InstanceProperties map where the property name is set to the element
number and the property value is set to the value of the element in the array.
- 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 array to empty.ArrayPropertyValue
(ArrayPropertyValue template) Copy/clone constructor set up the array 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 array.Return a copy of the array elements.int
hashCode()
Return a hash code based on the property valuesvoid
setArrayCount
(int arrayCount) Set up the number of elements in the array.void
setArrayValue
(int elementNumber, InstancePropertyValue propertyValue) Add or update an element in the array.void
setArrayValues
(InstanceProperties arrayValues) Set up the array 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
-
ArrayPropertyValue
public ArrayPropertyValue()Default constructor sets the array to empty. -
ArrayPropertyValue
Copy/clone constructor set up the array 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
-
getArrayCount
public int getArrayCount()Return the number of elements in the array.- Returns:
- int array size
-
setArrayCount
public void setArrayCount(int arrayCount) Set up the number of elements in the array.- Parameters:
arrayCount
- int array size
-
getArrayValues
Return a copy of the array elements.- Returns:
- InstanceProperties containing the array elements
-
setArrayValue
Add or update an element in the array.- Parameters:
elementNumber
- index number of the element in the arraypropertyValue
- value to store
-
setArrayValues
Set up the array elements in one call.- Parameters:
arrayValues
- 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
-