Class PrimitivePropertyValue
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.PrimitivePropertyValue
- All Implemented Interfaces:
Serializable
PrimitivePropertyValue stores a single primitive property. This is stored in the specific Java class
for the property value's type, although it is stored as an object.
- 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
ConstructorsConstructorDescriptionDefault constructor sets the primitive property value to null.PrimitivePropertyValue(PrimitivePropertyValue template) Copy/clone constructor copies the values from the supplied template. -
Method Summary
Modifier and TypeMethodDescriptionDelegate the process of cloning to the subclass.booleanValidate that an object is equal depending on their stored values.Return the category of the primitive's type.Return the primitive value.inthashCode()Return a hash code based on the property valuesvoidsetPrimitiveDefCategory(PrimitiveDefCategory primitiveDefCategory) Set up the category of the primitive type.voidsetPrimitiveValue(Object primitiveValue) Set up the primitive value.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, setInstancePropertyCategory, setTypeGUID, setTypeNameMethods inherited from class org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.RepositoryElementHeader
getHeaderVersion, setHeaderVersion
-
Constructor Details
-
PrimitivePropertyValue
public PrimitivePropertyValue()Default constructor sets the primitive property value to null. -
PrimitivePropertyValue
Copy/clone constructor copies the values from the supplied template.- Parameters:
template- PrimitivePropertyValue
-
-
Method Details
-
cloneFromSubclass
Delegate the process of cloning to the subclass.- Specified by:
cloneFromSubclassin classInstancePropertyValue- Returns:
- subclass of InstancePropertyValue
-
valueAsString
Return the string version of the value - used for error logging.- Specified by:
valueAsStringin classInstancePropertyValue- Returns:
- string value
-
valueAsObject
Return the object version of the value - used for comparisons.- Specified by:
valueAsObjectin classInstancePropertyValue- Returns:
- object value
-
getPrimitiveDefCategory
Return the category of the primitive's type. This sets the name and Java Class used for the primitive value.- Returns:
- PrimitiveDefCategory
-
setPrimitiveDefCategory
Set up the category of the primitive type. This sets the name and Java Class used for the primitive value.- Parameters:
primitiveDefCategory- PrimitiveDefCategory enum
-
getPrimitiveValue
Return the primitive value. It is already set up to be the appropriate type for the primitive as defined in the PrimitiveDefCategory.- Returns:
- Object containing the primitive value.
-
setPrimitiveValue
Set up the primitive value. Although it is passed in as a java.lang.Object, it should be the correct type as defined by the PrimitiveDefCategory.- Parameters:
primitiveValue- object contain the primitive value
-
toString
Standard toString method.- Overrides:
toStringin classInstancePropertyValue- Returns:
- JSON style description of variables.
-
equals
Validate that an object is equal depending on their stored values.- Overrides:
equalsin classInstancePropertyValue- Parameters:
objectToCompare- object- Returns:
- boolean result
-
hashCode
public int hashCode()Return a hash code based on the property values- Overrides:
hashCodein classInstancePropertyValue- Returns:
- int hash code
-