Class GetLatestVersionDAO

  • All Implemented Interfaces:
    IDatabaseSupplier<java.util.Map<java.lang.String,​java.lang.Integer>>

    public class GetLatestVersionDAO
    extends java.lang.Object
    implements IDatabaseSupplier<java.util.Map<java.lang.String,​java.lang.Integer>>
    Get the latest version by object type and name. This is important, because we deploy the schema in parallel, and so certain objects might end up with different versions at different times (in case of failures)
    The Map<String,Integer&rt; returned from run(IDatabaseTranslator, Connection) uses a compound string of type:name for the key e.g. "Table:PATIENT_RESOURCES".
    • Constructor Summary

      Constructors 
      Constructor Description
      GetLatestVersionDAO​(java.lang.String adminSchemaName, java.lang.String schemaName)
      Public constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.Integer> run​(IDatabaseTranslator translator, java.sql.Connection c)
      Execute the statement using the connection and return the value
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GetLatestVersionDAO

        public GetLatestVersionDAO​(java.lang.String adminSchemaName,
                                   java.lang.String schemaName)
        Public constructor
        Parameters:
        adminSchemaName -
        schemaName -
    • Method Detail

      • run

        public java.util.Map<java.lang.String,​java.lang.Integer> run​(IDatabaseTranslator translator,
                                                                           java.sql.Connection c)
        Description copied from interface: IDatabaseSupplier
        Execute the statement using the connection and return the value
        Specified by:
        run in interface IDatabaseSupplier<java.util.Map<java.lang.String,​java.lang.Integer>>
        Parameters:
        translator - to translate any exceptions