Class TableHasData
- java.lang.Object
-
- org.linuxforhealth.fhir.schema.control.TableHasData
-
- All Implemented Interfaces:
IDatabaseSupplier<java.lang.Boolean>
public class TableHasData extends java.lang.Object implements IDatabaseSupplier<java.lang.Boolean>
Check if data exists in the given table.
-
-
Constructor Summary
Constructors Constructor Description TableHasData(java.lang.String schemaName, java.lang.String tableName, IDatabaseAdapter adapter)
Instantiates a new TableHasData.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Boolean
run(IDatabaseTranslator translator, java.sql.Connection c)
Execute the statement using the connection and return the value.
-
-
-
Constructor Detail
-
TableHasData
public TableHasData(java.lang.String schemaName, java.lang.String tableName, IDatabaseAdapter adapter)
Instantiates a new TableHasData.- Parameters:
schemaName
- the schema containing the FHIR data tablestableName
- the table nameadapter
- the database adapter
-
-
Method Detail
-
run
public java.lang.Boolean run(IDatabaseTranslator translator, java.sql.Connection c)
Execute the statement using the connection and return the value.- Specified by:
run
in interfaceIDatabaseSupplier<java.lang.Boolean>
- Parameters:
translator
- the translator to adjust DDL/DML/SQL statements to match the target databasec
- the JDBC connection- Returns:
- the boolean. Returns true if data is available in the given table
-
-