-
- All Implemented Interfaces:
-
java.io.Serializable
public abstract class MetadataObject implements Serializable
Provides a common metadata collection for any data model objects using a generic, dynamic set of metadata properties.
-
-
Constructor Summary
Constructors Constructor Description MetadataObject(Map<String, Object> properties)
Initializes a MetadataObject with the given metadata properties.
-
Method Summary
Modifier and Type Method Description Map<String, Object>
getProperties()
Retrieves a Map of dynamic properties for this object. String
getStringProperty(String propertyName)
Convenience method to retrieve a property from the dynamic properties Map that is expectedto be a String. static String
getStringProperty(@NonNull() Map<String, Object> properties, @NonNull() String propertyName)
Convenience static method to retrieve a property from a properties Map that is expectedto be a String. Integer
getIntegerProperty(String propertyName)
Convenience method to retrieve a property from the dynamic properties Map that is expected tobe an Integer. static Integer
getIntegerProperty(Map<String, Object> properties, String propertyName)
Convenience static method to retrieve a property from a properties Map that is expected tobe an Integer. static Long
getLongProperty(Map<String, Object> properties, String propertyName)
Convenience static method to retrieve a property from a properties Map that is expected tobe an Integer. String
toString()
-
-
Method Detail
-
getProperties
@NonNull() Map<String, Object> getProperties()
Retrieves a Map of dynamic properties for this object.
-
getStringProperty
String getStringProperty(String propertyName)
Convenience method to retrieve a property from the dynamic properties Map that is expectedto be a String.
- Parameters:
propertyName
- the Map key for the desired property
-
getStringProperty
@Nullable() static String getStringProperty(@NonNull() Map<String, Object> properties, @NonNull() String propertyName)
Convenience static method to retrieve a property from a properties Map that is expectedto be a String.
- Parameters:
properties
- the properties Map objectpropertyName
- the Map key for the desired property
-
getIntegerProperty
Integer getIntegerProperty(String propertyName)
Convenience method to retrieve a property from the dynamic properties Map that is expected tobe an Integer. Any parsing errors will yield a null response.
- Parameters:
propertyName
- the Map key for the desired property
-
getIntegerProperty
static Integer getIntegerProperty(Map<String, Object> properties, String propertyName)
Convenience static method to retrieve a property from a properties Map that is expected tobe an Integer. Any parsing errors will yield a null response.
- Parameters:
properties
- the properties Map objectpropertyName
- the Map key for the desired property
-
getLongProperty
static Long getLongProperty(Map<String, Object> properties, String propertyName)
Convenience static method to retrieve a property from a properties Map that is expected tobe an Integer. Any parsing errors will yield a null response.
- Parameters:
properties
- the properties Map objectpropertyName
- the Map key for the desired property
-
-
-
-