Package org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.utilities
Class OMRSRepositoryPropertiesUtilities
java.lang.Object
org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.utilities.OMRSRepositoryPropertiesUtilities
- All Implemented Interfaces:
OMRSRepositoryPropertiesHelper
- Direct Known Subclasses:
OMRSArchiveHelper
,OMRSRepositoryContentHelper
public class OMRSRepositoryPropertiesUtilities
extends Object
implements OMRSRepositoryPropertiesHelper
OMRSRepositoryPropertiesUtilities implements the methods to add and remove values from InstanceProperties
objects as defined by the OMRSRepositoryPropertiesHelper interface.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddBooleanMapPropertyToInstance
(String sourceName, InstanceProperties properties, String propertyName, Map<String, Boolean> mapValues, String methodName) If the supplied map property is not null, add it to an instance properties object.addBooleanPropertyMapToInstance
(String sourceName, InstanceProperties properties, String propertyName, Map<String, Boolean> mapValues, String methodName) Add the supplied property map to an instance properties object.addBooleanPropertyToInstance
(String sourceName, InstanceProperties properties, String propertyName, boolean propertyValue, String methodName) Add the supplied property to an instance properties object.addDateMapPropertyToInstance
(String sourceName, InstanceProperties properties, String propertyName, Map<String, Date> mapValues, String methodName) If the supplied map property is not null, add it to an instance properties object.addDatePropertyMapToInstance
(String sourceName, InstanceProperties properties, String propertyName, Map<String, Date> mapValues, String methodName) Add the supplied property map to an instance properties object.addDatePropertyToInstance
(String sourceName, InstanceProperties properties, String propertyName, Date propertyValue, String methodName) If the supplied property is not null, add it to an instance properties object.addDoubleMapPropertyToInstance
(String sourceName, InstanceProperties properties, String propertyName, Map<String, Double> mapValues, String methodName) If the supplied map property is not null, add it to an instance properties object.addDoublePropertyMapToInstance
(String sourceName, InstanceProperties properties, String propertyName, Map<String, Double> mapValues, String methodName) Add the supplied property map to an instance properties object.addDoublePropertyToInstance
(String sourceName, InstanceProperties properties, String propertyName, double propertyValue, String methodName) Add the supplied property to an instance properties object.addEnumPropertyToInstance
(String sourceName, InstanceProperties properties, String propertyName, String attributeTypeGUID, String attributeTypeName, int ordinal, String symbolicName, String description, String methodName) Add the supplied property to an instance properties object.addFloatPropertyToInstance
(String sourceName, InstanceProperties properties, String propertyName, float propertyValue, String methodName) Add the supplied property to an instance properties object.addIntMapPropertyToInstance
(String sourceName, InstanceProperties properties, String propertyName, Map<String, Integer> mapValues, String methodName) If the supplied map property is not null, add it to an instance properties object.addIntPropertyMapToInstance
(String sourceName, InstanceProperties properties, String propertyName, Map<String, Integer> mapValues, String methodName) Add the supplied property map to an instance properties object.addIntPropertyToInstance
(String sourceName, InstanceProperties properties, String propertyName, int propertyValue, String methodName) Add the supplied property to an instance properties object.addLongMapPropertyToInstance
(String sourceName, InstanceProperties properties, String propertyName, Map<String, Long> mapValues, String methodName) If the supplied map property is not null, add it to an instance properties object.addLongPropertyMapToInstance
(String sourceName, InstanceProperties properties, String propertyName, Map<String, Long> mapValues, String methodName) Add the supplied property map to an instance properties object.addLongPropertyToInstance
(String sourceName, InstanceProperties properties, String propertyName, long propertyValue, String methodName) Add the supplied property to an instance properties object.addMapPropertyToInstance
(String sourceName, InstanceProperties properties, String propertyName, Map<String, Object> mapValues, String methodName) If the supplied map property is not null, add it to an instance properties object.addObjectPropertyToInstance
(String sourceName, InstanceProperties properties, String propertyName, Object propertyValue, String methodName) Add the supplied property to an instance properties object.addPropertyMapToInstance
(String sourceName, InstanceProperties properties, Map<String, Object> mapValues, String methodName) Add the supplied property map to an instance properties object.addStringArrayPropertyToInstance
(String sourceName, InstanceProperties properties, String propertyName, List<String> arrayValues, String methodName) If the supplied array property is not null, add it to an instance properties object.addStringArrayStringMapPropertyToInstance
(String sourceName, InstanceProperties properties, String propertyName, Map<String, List<String>> mapValues, String methodName) If the supplied map property is not null, add it to an instance properties object.addStringMapPropertyToInstance
(String sourceName, InstanceProperties properties, String propertyName, Map<String, String> mapValues, String methodName) If the supplied map property is not null, add it to an instance properties object.addStringPropertyMapToInstance
(String sourceName, InstanceProperties properties, String propertyName, Map<String, String> mapValues, String methodName) Add the supplied property map to an instance properties object.addStringPropertyToInstance
(String sourceName, InstanceProperties properties, String propertyName, String propertyValue, String methodName) Add the supplied property to an instance properties object.applyPatch
(String sourceName, TypeDef originalTypeDef, TypeDefPatch typeDefPatch, String methodName) Returns an updated TypeDef that has had the supplied patch applied.getBooleanMapFromProperty
(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map.boolean
getBooleanProperty
(String sourceName, String propertyName, InstanceProperties properties, String methodName) Return the requested property or false if property is not found.getDateMapFromProperty
(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map.getDateProperty
(String sourceName, String propertyName, InstanceProperties properties, String methodName) Return the requested property or null if property is not found.getDoubleMapFromProperty
(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map.int
getEnumPropertyOrdinal
(String sourceName, String propertyName, InstanceProperties properties, String methodName) Retrieve the ordinal value from an enum property.getInstancePropertiesAsMap
(InstanceProperties instanceProperties) Convert an instance properties object into a map.getIntegerMapFromProperty
(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map.int
getIntProperty
(String sourceName, String propertyName, InstanceProperties properties, String methodName) Return the requested property or 0 if property is not found.getLongMapFromProperty
(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map.long
getLongProperty
(String sourceName, String propertyName, InstanceProperties properties, String methodName) Return the requested property or 0 if property is not found.getMapFromProperty
(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map.getMapProperty
(String sourceName, String propertyName, InstanceProperties properties, String methodName) Return the requested property or null if property is not found.getSearchPropertiesFromInstanceProperties
(String sourceName, InstanceProperties properties, MatchCriteria matchCriteria) Convert the provided instance properties and match criteria into an equivalent SearchProperties object.getStringArrayProperty
(String sourceName, String propertyName, InstanceProperties properties, String callingMethodName) Locates and extracts a string array property and extracts its values.getStringArrayStringMapFromProperty
(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map.getStringMapFromProperty
(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map.getStringProperty
(String sourceName, String propertyName, InstanceProperties properties, String methodName) Return the requested property or null if property is not found.getUniquePropertiesList
(List<TypeDefAttribute> definedAttributes, List<String> currentList) Add the list of unique properties for the type to the supplied list and return the combined results.removeBooleanMapFromProperty
(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map.boolean
removeBooleanProperty
(String sourceName, String propertyName, InstanceProperties properties, String methodName) Return the requested property or false if property is not found.removeDateMapFromProperty
(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map.removeDateProperty
(String sourceName, String propertyName, InstanceProperties properties, String methodName) Return the requested property or null if property is not found.removeDoubleMapFromProperty
(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map.int
removeEnumPropertyOrdinal
(String sourceName, String propertyName, InstanceProperties properties, String methodName) Retrieve the ordinal value from an enum property.removeIntegerMapFromProperty
(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map.int
removeIntProperty
(String sourceName, String propertyName, InstanceProperties properties, String methodName) Return the requested property or 0 if property is not found.removeLongMapFromProperty
(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map.long
removeLongProperty
(String sourceName, String propertyName, InstanceProperties properties, String methodName) Return the requested property or 0 if property is not found.removeMapFromProperty
(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map.protected void
removeProperty
(String propertyName, InstanceProperties properties) Remove the named property from the instance properties object.removeStringArrayProperty
(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a string array property and extracts its values.removeStringArrayStringMapFromProperty
(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map.removeStringMapFromProperty
(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map.removeStringProperty
(String sourceName, String propertyName, InstanceProperties properties, String methodName) Return the requested property or null if property is not found.void
validateTypeDefPatch
(String sourceName, TypeDefPatch typeDefPatch, String methodName) Verify that a TypeDefPatch is not null and is for a recognized type.
-
Field Details
-
METADATA_COLLECTION_ID_PROPERTY_NAME
- See Also:
-
METADATA_COLLECTION_NAME_PROPERTY_NAME
- See Also:
-
-
Constructor Details
-
OMRSRepositoryPropertiesUtilities
public OMRSRepositoryPropertiesUtilities()
-
-
Method Details
-
removeProperty
Remove the named property from the instance properties object.- Parameters:
propertyName
- name of property to removeproperties
- instance properties object to work on
-
getStringProperty
public String getStringProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName) Return the requested property or null if property is not found. If the property is not a string property then a logic exception is thrown- Specified by:
getStringProperty
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- source of callpropertyName
- name of requested propertyproperties
- properties from the instance.methodName
- method of caller- Returns:
- string property value or null
-
removeStringProperty
public String removeStringProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName) Return the requested property or null if property is not found. If the property is found, it is removed from the InstanceProperties structure. If the property is not a string property then a logic exception is thrown.- Specified by:
removeStringProperty
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- source of callpropertyName
- name of requested propertyproperties
- properties from the instance.methodName
- method of caller- Returns:
- string property value or null
-
getEnumPropertyOrdinal
public int getEnumPropertyOrdinal(String sourceName, String propertyName, InstanceProperties properties, String methodName) Retrieve the ordinal value from an enum property.- Specified by:
getEnumPropertyOrdinal
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- source of callpropertyName
- name of requested propertyproperties
- properties from the instance.methodName
- method of caller- Returns:
- int ordinal or -1 if not found
-
removeEnumPropertyOrdinal
public int removeEnumPropertyOrdinal(String sourceName, String propertyName, InstanceProperties properties, String methodName) Retrieve the ordinal value from an enum property.- Specified by:
removeEnumPropertyOrdinal
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- source of callpropertyName
- name of requested propertyproperties
- properties from the instance.methodName
- method of caller- Returns:
- int ordinal or -1 if not found
-
getMapProperty
public InstanceProperties getMapProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName) Return the requested property or null if property is not found. If the property is not a map property then a logic exception is thrown- Specified by:
getMapProperty
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- source of callpropertyName
- name of requested propertyproperties
- properties from the instance.methodName
- method of caller- Returns:
- string property value or null
-
getStringArrayProperty
public List<String> getStringArrayProperty(String sourceName, String propertyName, InstanceProperties properties, String callingMethodName) Locates and extracts a string array property and extracts its values.- Specified by:
getStringArrayProperty
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- source of callpropertyName
- name of requested map propertyproperties
- all the properties of the instancecallingMethodName
- method of caller- Returns:
- array property value or null
-
removeStringArrayProperty
public List<String> removeStringArrayProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a string array property and extracts its values. If the property is found, it is removed from the InstanceProperties structure. If the property is not an array property then a logic exception is thrown.- Specified by:
removeStringArrayProperty
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- source of callpropertyName
- name of requested map propertyproperties
- all the properties of the instancemethodName
- method of caller- Returns:
- array property value or null
-
getStringMapFromProperty
public Map<String,String> getStringMapFromProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map.- Specified by:
getStringMapFromProperty
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- source of callpropertyName
- name of requested map propertyproperties
- values of the propertymethodName
- method of caller- Returns:
- map property value or null
-
removeStringMapFromProperty
public Map<String,String> removeStringMapFromProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map. If the property is found, it is removed from the InstanceProperties structure. If the property is not a map property then a logic exception is thrown.- Specified by:
removeStringMapFromProperty
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- source of callpropertyName
- name of requested map propertyproperties
- values of the propertymethodName
- method of caller- Returns:
- map property value or null
-
getBooleanMapFromProperty
public Map<String,Boolean> getBooleanMapFromProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map.- Specified by:
getBooleanMapFromProperty
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- source of callpropertyName
- name of requested map propertyproperties
- values of the propertymethodName
- method of caller- Returns:
- map property value or null
-
removeBooleanMapFromProperty
public Map<String,Boolean> removeBooleanMapFromProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map. If the property is found, it is removed from the InstanceProperties structure. If the property is not a map property then a logic exception is thrown.- Specified by:
removeBooleanMapFromProperty
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- source of callpropertyName
- name of requested map propertyproperties
- values of the propertymethodName
- method of caller- Returns:
- map property value or null
-
getLongMapFromProperty
public Map<String,Long> getLongMapFromProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map.- Specified by:
getLongMapFromProperty
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- source of callpropertyName
- name of requested map propertyproperties
- values of the propertymethodName
- method of caller- Returns:
- map property value or null
-
removeLongMapFromProperty
public Map<String,Long> removeLongMapFromProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map. If the property is found, it is removed from the InstanceProperties structure. If the property is not a map property then a logic exception is thrown.- Specified by:
removeLongMapFromProperty
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- source of callpropertyName
- name of requested map propertyproperties
- values of the propertymethodName
- method of caller- Returns:
- map property value or null
-
getDateMapFromProperty
public Map<String,Date> getDateMapFromProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map.- Specified by:
getDateMapFromProperty
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- source of callpropertyName
- name of requested map propertyproperties
- values of the propertymethodName
- method of caller- Returns:
- map property value or null
-
removeDateMapFromProperty
public Map<String,Date> removeDateMapFromProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map. If the property is found, it is removed from the InstanceProperties structure. If the property is not a map property then a logic exception is thrown.- Specified by:
removeDateMapFromProperty
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- source of callpropertyName
- name of requested map propertyproperties
- values of the propertymethodName
- method of caller- Returns:
- map property value or null
-
getDoubleMapFromProperty
public Map<String,Double> getDoubleMapFromProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map.- Specified by:
getDoubleMapFromProperty
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- source of callpropertyName
- name of requested map propertyproperties
- values of the propertymethodName
- method of caller- Returns:
- map property value or null
-
removeDoubleMapFromProperty
public Map<String,Double> removeDoubleMapFromProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map. If the property is found, it is removed from the InstanceProperties structure. If the property is not a map property then a logic exception is thrown.- Specified by:
removeDoubleMapFromProperty
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- source of callpropertyName
- name of requested map propertyproperties
- values of the propertymethodName
- method of caller- Returns:
- map property value or null
-
getIntegerMapFromProperty
public Map<String,Integer> getIntegerMapFromProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map.- Specified by:
getIntegerMapFromProperty
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- source of callpropertyName
- name of requested map propertyproperties
- values of the propertymethodName
- method of caller- Returns:
- map property value or null
-
removeIntegerMapFromProperty
public Map<String,Integer> removeIntegerMapFromProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map. If the property is found, it is removed from the InstanceProperties structure. If the property is not a map property then a logic exception is thrown.- Specified by:
removeIntegerMapFromProperty
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- source of callpropertyName
- name of requested map propertyproperties
- values of the propertymethodName
- method of caller- Returns:
- map property value or null
-
getStringArrayStringMapFromProperty
public Map<String,List<String>> getStringArrayStringMapFromProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map.- Specified by:
getStringArrayStringMapFromProperty
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- source of callpropertyName
- name of requested map propertyproperties
- values of the propertymethodName
- method of caller- Returns:
- map property value or null
-
removeStringArrayStringMapFromProperty
public Map<String,List<String>> removeStringArrayStringMapFromProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map. If the property is found, it is removed from the InstanceProperties structure. If the property is not a map property then a logic exception is thrown.- Specified by:
removeStringArrayStringMapFromProperty
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- source of callpropertyName
- name of requested map propertyproperties
- values of the propertymethodName
- method of caller- Returns:
- map property value or null
-
getMapFromProperty
public Map<String,Object> getMapFromProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map.- Specified by:
getMapFromProperty
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- source of callpropertyName
- name of requested map propertyproperties
- all the properties of the instancemethodName
- method of caller- Returns:
- map property value or null
-
removeMapFromProperty
public Map<String,Object> removeMapFromProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName) Locates and extracts a property from an instance that is of type map and then converts its values into a Java map. If the property is found, it is removed from the InstanceProperties structure. If the property is not a map property then a logic exception is thrown.- Specified by:
removeMapFromProperty
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- source of callpropertyName
- name of requested map propertyproperties
- values of the propertymethodName
- method of caller- Returns:
- map property value or null
-
getInstancePropertiesAsMap
Convert an instance properties object into a map.- Specified by:
getInstancePropertiesAsMap
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
instanceProperties
- packed properties- Returns:
- properties stored in Java map
-
getIntProperty
public int getIntProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName) Return the requested property or 0 if property is not found. If the property is not an int property then a logic exception is thrown.- Specified by:
getIntProperty
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- source of callpropertyName
- name of requested propertyproperties
- properties from the instance.methodName
- method of caller- Returns:
- string property value or null
-
removeIntProperty
public int removeIntProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName) Return the requested property or 0 if property is not found. If the property is found, it is removed from the InstanceProperties structure. If the property is not an int property then a logic exception is thrown.- Specified by:
removeIntProperty
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- source of callpropertyName
- name of requested propertyproperties
- properties from the instance.methodName
- method of caller- Returns:
- string property value or null
-
getLongProperty
public long getLongProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName) Return the requested property or 0 if property is not found. If the property is not a long property then a logic exception is thrown.- Specified by:
getLongProperty
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- source of callpropertyName
- name of requested propertyproperties
- properties from the instance.methodName
- method of caller- Returns:
- string property value or null
-
removeLongProperty
public long removeLongProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName) Return the requested property or 0 if property is not found. If the property is found, it is removed from the InstanceProperties structure. If the property is not a long property then a logic exception is thrown.- Specified by:
removeLongProperty
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- source of callpropertyName
- name of requested propertyproperties
- properties from the instance.methodName
- method of caller- Returns:
- string property value or null
-
getDateProperty
public Date getDateProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName) Return the requested property or null if property is not found. If the property is not a date property then a logic exception is thrown.- Specified by:
getDateProperty
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- source of callpropertyName
- name of requested propertyproperties
- properties from the instance.methodName
- method of caller- Returns:
- string property value or null
-
removeDateProperty
public Date removeDateProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName) Return the requested property or null if property is not found. If the property is found, it is removed from the InstanceProperties structure. If the property is not a date property then a logic exception is thrown.- Specified by:
removeDateProperty
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- source of callpropertyName
- name of requested propertyproperties
- properties from the instance.methodName
- method of caller- Returns:
- string property value or null
-
getBooleanProperty
public boolean getBooleanProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName) Return the requested property or false if property is not found. If the property is not a boolean property then a logic exception is thrown- Specified by:
getBooleanProperty
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- source of callpropertyName
- name of requested propertyproperties
- properties from the instance.methodName
- method of caller- Returns:
- string property value or null
-
removeBooleanProperty
public boolean removeBooleanProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName) Return the requested property or false if property is not found. If the property is found, it is removed from the InstanceProperties structure. If the property is not a boolean property then a logic exception is thrown.- Specified by:
removeBooleanProperty
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- source of callpropertyName
- name of requested propertyproperties
- properties from the instance.methodName
- method of caller- Returns:
- string property value or null
-
addObjectPropertyToInstance
public InstanceProperties addObjectPropertyToInstance(String sourceName, InstanceProperties properties, String propertyName, Object propertyValue, String methodName) Add the supplied property to an instance properties object. If the instance property object supplied is null, a new instance properties object is created.- Specified by:
addObjectPropertyToInstance
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- name of callerproperties
- properties object to add property to, may be null.propertyName
- name of propertypropertyValue
- value of propertymethodName
- calling method name- Returns:
- instance properties object.
-
addStringPropertyToInstance
public InstanceProperties addStringPropertyToInstance(String sourceName, InstanceProperties properties, String propertyName, String propertyValue, String methodName) Add the supplied property to an instance properties object. If the instance property object supplied is null, a new instance properties object is created.- Specified by:
addStringPropertyToInstance
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- name of callerproperties
- properties object to add property to, may be null.propertyName
- name of propertypropertyValue
- value of propertymethodName
- calling method name- Returns:
- instance properties object.
-
addIntPropertyToInstance
public InstanceProperties addIntPropertyToInstance(String sourceName, InstanceProperties properties, String propertyName, int propertyValue, String methodName) Add the supplied property to an instance properties object. If the instance property object supplied is null, a new instance properties object is created.- Specified by:
addIntPropertyToInstance
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- name of callerproperties
- properties object to add property to, may be null.propertyName
- name of propertypropertyValue
- value of propertymethodName
- calling method name- Returns:
- instance properties object.
-
addLongPropertyToInstance
public InstanceProperties addLongPropertyToInstance(String sourceName, InstanceProperties properties, String propertyName, long propertyValue, String methodName) Add the supplied property to an instance properties object. If the instance property object supplied is null, a new instance properties object is created.- Specified by:
addLongPropertyToInstance
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- name of callerproperties
- properties object to add. Property may be null.propertyName
- name of propertypropertyValue
- value of propertymethodName
- calling method name- Returns:
- instance properties object.
-
addDoublePropertyToInstance
public InstanceProperties addDoublePropertyToInstance(String sourceName, InstanceProperties properties, String propertyName, double propertyValue, String methodName) Add the supplied property to an instance properties object. If the instance property object supplied is null, a new instance properties object is created.- Specified by:
addDoublePropertyToInstance
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- name of callerproperties
- properties object to add. Property may be null.propertyName
- name of propertypropertyValue
- value of propertymethodName
- calling method name- Returns:
- instance properties object.
-
addFloatPropertyToInstance
public InstanceProperties addFloatPropertyToInstance(String sourceName, InstanceProperties properties, String propertyName, float propertyValue, String methodName) Add the supplied property to an instance properties object. If the instance property object supplied is null, a new instance properties object is created.- Specified by:
addFloatPropertyToInstance
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- name of callerproperties
- properties object to add. Property may be null.propertyName
- name of propertypropertyValue
- value of propertymethodName
- calling method name- Returns:
- instance properties object.
-
addDatePropertyToInstance
public InstanceProperties addDatePropertyToInstance(String sourceName, InstanceProperties properties, String propertyName, Date propertyValue, String methodName) If the supplied property is not null, add it to an instance properties object. If the instance property object supplied is null, a new instance properties object is created.- Specified by:
addDatePropertyToInstance
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- name of callerproperties
- properties object to add. Property may be null.propertyName
- name of propertypropertyValue
- value of propertymethodName
- calling method name- Returns:
- instance properties object.
-
addBooleanPropertyToInstance
public InstanceProperties addBooleanPropertyToInstance(String sourceName, InstanceProperties properties, String propertyName, boolean propertyValue, String methodName) Add the supplied property to an instance properties object. If the instance property object supplied is null, a new instance properties object is created.- Specified by:
addBooleanPropertyToInstance
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- name of callerproperties
- properties object to add property to, may be null.propertyName
- name of propertypropertyValue
- value of propertymethodName
- calling method name- Returns:
- instance properties object.
-
addEnumPropertyToInstance
public InstanceProperties addEnumPropertyToInstance(String sourceName, InstanceProperties properties, String propertyName, String attributeTypeGUID, String attributeTypeName, int ordinal, String symbolicName, String description, String methodName) Add the supplied property to an instance properties object. If the instance property object supplied is null, a new instance properties object is created.- Specified by:
addEnumPropertyToInstance
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- name of callerproperties
- properties object to add property to, may be null.propertyName
- name of propertyattributeTypeGUID
- unique identifier of the enum typeattributeTypeName
- unique name of the enum type * @param ordinal numeric value of propertysymbolicName
- String value of propertydescription
- String description of property valuemethodName
- calling method nameordinal
- numeric value of property- Returns:
- instance properties object.
-
addStringArrayPropertyToInstance
public InstanceProperties addStringArrayPropertyToInstance(String sourceName, InstanceProperties properties, String propertyName, List<String> arrayValues, String methodName) If the supplied array property is not null, add it to an instance properties object. The supplied array is stored as a single property in the instances properties. If the instance properties object supplied is null, a new instance properties object is created.- Specified by:
addStringArrayPropertyToInstance
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- name of callerproperties
- properties object to add property to, may be null.propertyName
- name of propertyarrayValues
- contents of the arraymethodName
- calling method name- Returns:
- instance properties object.
-
addMapPropertyToInstance
public InstanceProperties addMapPropertyToInstance(String sourceName, InstanceProperties properties, String propertyName, Map<String, Object> mapValues, String methodName) If the supplied map property is not null, add it to an instance properties object. The supplied map is stored as a single property in the instances properties. If the instance properties object supplied is null, a new instance properties object is created.- Specified by:
addMapPropertyToInstance
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- name of callerproperties
- properties object to add property to, may be null.propertyName
- name of propertymapValues
- contents of the mapmethodName
- calling method name- Returns:
- instance properties object.
-
addStringMapPropertyToInstance
public InstanceProperties addStringMapPropertyToInstance(String sourceName, InstanceProperties properties, String propertyName, Map<String, String> mapValues, String methodName) If the supplied map property is not null, add it to an instance properties object. The supplied map is stored as a single property in the instances properties. If the instance properties object supplied is null, a new instance properties object is created.- Specified by:
addStringMapPropertyToInstance
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- name of callerproperties
- properties object to add property to, may be null.propertyName
- name of propertymapValues
- contents of the mapmethodName
- calling method name- Returns:
- instance properties object.
-
addBooleanMapPropertyToInstance
public InstanceProperties addBooleanMapPropertyToInstance(String sourceName, InstanceProperties properties, String propertyName, Map<String, Boolean> mapValues, String methodName) If the supplied map property is not null, add it to an instance properties object. The supplied map is stored as a single property in the instances properties. If the instance properties object supplied is null, a new instance properties object is created.- Specified by:
addBooleanMapPropertyToInstance
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- name of callerproperties
- properties object to add property to, may be null.propertyName
- name of propertymapValues
- contents of the mapmethodName
- calling method name- Returns:
- instance properties object.
-
addDateMapPropertyToInstance
public InstanceProperties addDateMapPropertyToInstance(String sourceName, InstanceProperties properties, String propertyName, Map<String, Date> mapValues, String methodName) If the supplied map property is not null, add it to an instance properties object. The supplied map is stored as a single property in the instances properties. If the instance properties object supplied is null, a new instance properties object is created.- Specified by:
addDateMapPropertyToInstance
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- name of callerproperties
- properties object to add property to, may be null.propertyName
- name of propertymapValues
- contents of the mapmethodName
- calling method name- Returns:
- instance properties object.
-
addLongMapPropertyToInstance
public InstanceProperties addLongMapPropertyToInstance(String sourceName, InstanceProperties properties, String propertyName, Map<String, Long> mapValues, String methodName) If the supplied map property is not null, add it to an instance properties object. The supplied map is stored as a single property in the instances properties. If the instance properties object supplied is null, a new instance properties object is created.- Specified by:
addLongMapPropertyToInstance
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- name of callerproperties
- properties object to add property to, may be null.propertyName
- name of propertymapValues
- contents of the mapmethodName
- calling method name- Returns:
- instance properties object.
-
addDoubleMapPropertyToInstance
public InstanceProperties addDoubleMapPropertyToInstance(String sourceName, InstanceProperties properties, String propertyName, Map<String, Double> mapValues, String methodName) If the supplied map property is not null, add it to an instance properties object. The supplied map is stored as a single property in the instances properties. If the instance properties object supplied is null, a new instance properties object is created.- Specified by:
addDoubleMapPropertyToInstance
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- name of callerproperties
- properties object to add property to, may be null.propertyName
- name of propertymapValues
- contents of the mapmethodName
- calling method name- Returns:
- instance properties object.
-
addIntMapPropertyToInstance
public InstanceProperties addIntMapPropertyToInstance(String sourceName, InstanceProperties properties, String propertyName, Map<String, Integer> mapValues, String methodName) If the supplied map property is not null, add it to an instance properties object. The supplied map is stored as a single property in the instances properties. If the instance properties object supplied is null, a new instance properties object is created.- Specified by:
addIntMapPropertyToInstance
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- name of callerproperties
- properties object to add property to, may be null.propertyName
- name of propertymapValues
- contents of the mapmethodName
- calling method name- Returns:
- instance properties object.
-
addStringArrayStringMapPropertyToInstance
public InstanceProperties addStringArrayStringMapPropertyToInstance(String sourceName, InstanceProperties properties, String propertyName, Map<String, List<String>> mapValues, String methodName) If the supplied map property is not null, add it to an instance properties object. The supplied map is stored as a single property in the instances properties. If the instance properties object supplied is null, a new instance properties object is created.- Specified by:
addStringArrayStringMapPropertyToInstance
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- name of callerproperties
- properties object to add property to, may be null.propertyName
- name of propertymapValues
- contents of the mapmethodName
- calling method name- Returns:
- instance properties object.
-
addPropertyMapToInstance
public InstanceProperties addPropertyMapToInstance(String sourceName, InstanceProperties properties, Map<String, Object> mapValues, String methodName) Add the supplied property map to an instance properties object. Each of the entries in the map is added as a separate property in instance properties. If the instance properties object supplied is null, a new instance properties object is created.- Specified by:
addPropertyMapToInstance
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- name of callerproperties
- properties object to add property to, may be null.mapValues
- contents of the mapmethodName
- calling method name- Returns:
- instance properties object.
-
addStringPropertyMapToInstance
public InstanceProperties addStringPropertyMapToInstance(String sourceName, InstanceProperties properties, String propertyName, Map<String, String> mapValues, String methodName) Add the supplied property map to an instance properties object. Each of the entries in the map is added as a separate property in instance properties unless it is null. If the instance properties object supplied is null, a new instance properties object is created.- Specified by:
addStringPropertyMapToInstance
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- name of callerproperties
- properties object to add property to, may be null.propertyName
- name of propertymapValues
- contents of the mapmethodName
- calling method name- Returns:
- instance properties object.
-
addBooleanPropertyMapToInstance
public InstanceProperties addBooleanPropertyMapToInstance(String sourceName, InstanceProperties properties, String propertyName, Map<String, Boolean> mapValues, String methodName) Add the supplied property map to an instance properties object. Each of the entries in the map is added as a separate property in instance properties unless it is null. If the instance properties object supplied is null, a new instance properties object is created.- Specified by:
addBooleanPropertyMapToInstance
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- name of callerproperties
- properties object to add property to, may be null.propertyName
- name of propertymapValues
- contents of the mapmethodName
- calling method name- Returns:
- instance properties object.
-
addLongPropertyMapToInstance
public InstanceProperties addLongPropertyMapToInstance(String sourceName, InstanceProperties properties, String propertyName, Map<String, Long> mapValues, String methodName) Add the supplied property map to an instance properties object. Each of the entries in the map is added as a separate property in instance properties unless it is null. If the instance properties object supplied is null, a new instance properties object is created.- Specified by:
addLongPropertyMapToInstance
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- name of callerproperties
- properties object to add property to, may be null.propertyName
- name of propertymapValues
- contents of the mapmethodName
- calling method name- Returns:
- instance properties object.
-
addDatePropertyMapToInstance
public InstanceProperties addDatePropertyMapToInstance(String sourceName, InstanceProperties properties, String propertyName, Map<String, Date> mapValues, String methodName) Add the supplied property map to an instance properties object. Each of the entries in the map is added as a separate property in instance properties unless it is null. If the instance properties object supplied is null, a new instance properties object is created.- Specified by:
addDatePropertyMapToInstance
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- name of callerproperties
- properties object to add property to, may be null.propertyName
- name of propertymapValues
- contents of the mapmethodName
- calling method name- Returns:
- instance properties object.
-
addDoublePropertyMapToInstance
public InstanceProperties addDoublePropertyMapToInstance(String sourceName, InstanceProperties properties, String propertyName, Map<String, Double> mapValues, String methodName) Add the supplied property map to an instance properties object. Each of the entries in the map is added as a separate property in instance properties unless it is null. If the instance properties object supplied is null, a new instance properties object is created.- Specified by:
addDoublePropertyMapToInstance
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- name of callerproperties
- properties object to add property to, may be null.propertyName
- name of propertymapValues
- contents of the mapmethodName
- calling method name- Returns:
- instance properties object.
-
addIntPropertyMapToInstance
public InstanceProperties addIntPropertyMapToInstance(String sourceName, InstanceProperties properties, String propertyName, Map<String, Integer> mapValues, String methodName) Add the supplied property map to an instance properties object. Each of the entries in the map is added as a separate property in instance properties unless it is null. If the instance properties object supplied is null, a new instance properties object is created.- Specified by:
addIntPropertyMapToInstance
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- name of callerproperties
- properties object to add property to, may be null.propertyName
- name of propertymapValues
- contents of the mapmethodName
- calling method name- Returns:
- instance properties object.
-
validateTypeDefPatch
public void validateTypeDefPatch(String sourceName, TypeDefPatch typeDefPatch, String methodName) throws InvalidParameterException, PatchErrorException Verify that a TypeDefPatch is not null and is for a recognized type.- Parameters:
sourceName
- source of the request (used for logging)typeDefPatch
- typeDefPatch to testmethodName
- calling method- Throws:
InvalidParameterException
- the original typeDef or typeDefPatch is nullPatchErrorException
- the typeDefPatch is invalid
-
applyPatch
public TypeDef applyPatch(String sourceName, TypeDef originalTypeDef, TypeDefPatch typeDefPatch, String methodName) throws InvalidParameterException, PatchErrorException Returns an updated TypeDef that has had the supplied patch applied. It throws an exception if any part of the patch is incompatible with the original TypeDef. For example, if there is a mismatch between the type or version that either represents.- Parameters:
sourceName
- source of the TypeDef (used for logging)originalTypeDef
- typeDef to updatetypeDefPatch
- patch to applymethodName
- calling method- Returns:
- updated TypeDef
- Throws:
InvalidParameterException
- the original typeDef or typeDefPatch is nullPatchErrorException
- the patch is either badly formatted, or does not apply to the supplied TypeDef
-
getSearchPropertiesFromInstanceProperties
public SearchProperties getSearchPropertiesFromInstanceProperties(String sourceName, InstanceProperties properties, MatchCriteria matchCriteria) Convert the provided instance properties and match criteria into an equivalent SearchProperties object.- Specified by:
getSearchPropertiesFromInstanceProperties
in interfaceOMRSRepositoryPropertiesHelper
- Parameters:
sourceName
- name of the callerproperties
- properties object to convertmatchCriteria
- match criteria to apply- Returns:
- SearchProperties object.
-
getUniquePropertiesList
protected List<String> getUniquePropertiesList(List<TypeDefAttribute> definedAttributes, List<String> currentList) Add the list of unique properties for the type to the supplied list and return the combined results.- Parameters:
definedAttributes
- list of attributes defined for the typedefcurrentList
- current list of properties extracted from the subtypes- Returns:
- accumulated list of properties.
-