Class PrintTarget
- java.lang.Object
-
- org.linuxforhealth.fhir.database.utils.common.PrintTarget
-
- All Implemented Interfaces:
IDatabaseTarget
public class PrintTarget extends java.lang.Object implements IDatabaseTarget
Simple decorator to print out the DDL statement being run
-
-
Constructor Summary
Constructors Constructor Description PrintTarget(IDatabaseTarget decorated, boolean printFlag)
Public constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
runStatement(IDatabaseTranslator translator, java.lang.String ddl)
Run the given DDL statement against the connection managed by the implementation of this interfacevoid
runStatement(IDatabaseTranslator translator, IDatabaseStatement statement)
Run the statement using the resources (e.g.<T> T
runStatement(IDatabaseTranslator translator, IDatabaseSupplier<T> supplier)
Run a statement returning a value of type T.void
runStatementWithInt(IDatabaseTranslator translator, java.lang.String sql, int value)
Convenience method for running a SQL statement requiring a single int parameter
-
-
-
Constructor Detail
-
PrintTarget
public PrintTarget(IDatabaseTarget decorated, boolean printFlag)
Public constructor- Parameters:
decorated
-
-
-
Method Detail
-
runStatement
public void runStatement(IDatabaseTranslator translator, java.lang.String ddl)
Description copied from interface:IDatabaseTarget
Run the given DDL statement against the connection managed by the implementation of this interface- Specified by:
runStatement
in interfaceIDatabaseTarget
-
runStatementWithInt
public void runStatementWithInt(IDatabaseTranslator translator, java.lang.String sql, int value)
Description copied from interface:IDatabaseTarget
Convenience method for running a SQL statement requiring a single int parameter- Specified by:
runStatementWithInt
in interfaceIDatabaseTarget
-
runStatement
public void runStatement(IDatabaseTranslator translator, IDatabaseStatement statement)
Description copied from interface:IDatabaseTarget
Run the statement using the resources (e.g. connection) held by the implementation of this interface- Specified by:
runStatement
in interfaceIDatabaseTarget
-
runStatement
public <T> T runStatement(IDatabaseTranslator translator, IDatabaseSupplier<T> supplier)
Description copied from interface:IDatabaseTarget
Run a statement returning a value of type T.- Specified by:
runStatement
in interfaceIDatabaseTarget
- Returns:
-
-