Class OMEntityDao


  • public class OMEntityDao
    extends Object
    The class implements access wrapper to retrieve data OMRS.
    • Method Detail

      • setContext

        public void setContext​(String value)
        Set context of the execution for logging.
        Parameters:
        value - high level method/operation requested by user.
      • buildMatchingInstanceProperties

        public InstanceProperties buildMatchingInstanceProperties​(Map<String,​String> properties,
                                                                  boolean zoneRestricted)
        Returns the properties object for the given pair of key - value that can be used for retrieving
        Parameters:
        properties - - all properties to use for matching
        zoneRestricted - to take into account zones.
        Returns:
        properties with the given key - value pair
      • getRelationshipsByGUIDForEntity

        public List<Relationship> getRelationshipsByGUIDForEntity​(EntityDetail entity,
                                                                  String relationshipTypeGUID)
                                                           throws AnalyticsModelingCheckedException
        Get relationships of certain GUID for the entity.
        Parameters:
        entity - whose relationships are requested.
        relationshipTypeGUID - only relationship of the type are requested. All relationships are returned if null.
        Returns:
        requested relationships.
        Throws:
        AnalyticsModelingCheckedException - in case of repository fails.
      • getEntityQName

        public String getEntityQName​(EntityDetail entity)
        Get qualified name property for the entity.
        Parameters:
        entity - whose qualified name is requested.
        Returns:
        qualified name.
      • getEntityStringProperty

        public String getEntityStringProperty​(EntityDetail entity,
                                              String name)
        Get entity property of type string.
        Parameters:
        entity - whose property is requested.
        name - if the requested property.
        Returns:
        property value.
      • getEntityBooleanProperty

        public Boolean getEntityBooleanProperty​(EntityDetail entity,
                                                String name)
        Get entity property of type boolean.
        Parameters:
        entity - whose property is requested.
        name - if the requested property.
        Returns:
        property value.
      • getEntityIntProperty

        public int getEntityIntProperty​(EntityDetail entity,
                                        String name)
        Get entity property of type integer.
        Parameters:
        entity - whose property is requested.
        name - if the requested property.
        Returns:
        property value.
      • getStringProperty

        public String getStringProperty​(String name,
                                        InstanceProperties properties)
        Get property of type string from collection of instance properties.
        Parameters:
        name - if the requested property.
        properties - collection of instance properties
        Returns:
        property value.
      • getMapProperty

        public InstanceProperties getMapProperty​(InstanceProperties properties,
                                                 String name)
        Get map of property from collection of instance properties.
        Parameters:
        name - if the requested property.
        properties - collection of instance properties
        Returns:
        property value.