Class GetLatestVersionDAO
- java.lang.Object
-
- org.linuxforhealth.fhir.database.utils.version.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)
TheMap<String,Integer&rt;
returned fromrun(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
-
-
-
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 interfaceIDatabaseSupplier<java.util.Map<java.lang.String,java.lang.Integer>>
- Parameters:
translator
- to translate any exceptions
-
-