Class CommonValuesDAO

  • All Implemented Interfaces:
    ICommonValuesDAO
    Direct Known Subclasses:
    DerbyCommonValuesDAO

    public class CommonValuesDAO
    extends java.lang.Object
    implements ICommonValuesDAO
    DAO to fetch common value records normalized in common_token_values, common_canonical_values and code_systems
    • Constructor Detail

      • CommonValuesDAO

        public CommonValuesDAO​(IDatabaseTranslator t,
                               java.sql.Connection c,
                               java.lang.String schemaName)
        Public constructor
        Parameters:
        t -
        c -
        schemaName -
    • Method Detail

      • getConnection

        protected java.sql.Connection getConnection()
        Getter for the Connection held by this DAO
        Returns:
      • getSchemaName

        protected java.lang.String getSchemaName()
        Getter for subclass access to the schemaName
        Returns:
      • readCommonTokenValueId

        public CommonTokenValueResult readCommonTokenValueId​(java.lang.String codeSystem,
                                                             java.lang.String tokenValue)
        Description copied from interface: ICommonValuesDAO
        Find the database id for the given token value and system
        Specified by:
        readCommonTokenValueId in interface ICommonValuesDAO
        Returns:
        the matching id from common_token_values.common_token_value_id or null if not found
      • readCommonTokenValueIds

        public java.util.Set<CommonTokenValueResult> readCommonTokenValueIds​(java.util.Collection<CommonTokenValue> tokenValues)
        Description copied from interface: ICommonValuesDAO
        Find database ids for a set of common token values
        Specified by:
        readCommonTokenValueIds in interface ICommonValuesDAO
        Returns:
        a non-null, possibly-empty set of ids from common_token_values.common_token_value_id; CommonTokenValues with no corresponding record will be omitted from the set
      • readCanonicalId

        public java.lang.Long readCanonicalId​(java.lang.String canonicalValue)
        Description copied from interface: ICommonValuesDAO
        Read the database canonical_id for the given value
        Specified by:
        readCanonicalId in interface ICommonValuesDAO
        Returns:
      • readCommonTokenValueIdList

        public java.util.List<java.lang.Long> readCommonTokenValueIdList​(java.lang.String tokenValue)
        Description copied from interface: ICommonValuesDAO
        Fetch the list of matching common_token_value_id records for the given tokenValue.
        Specified by:
        readCommonTokenValueIdList in interface ICommonValuesDAO
        Returns: