Class 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.
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 tables
        tableName - the table name
        adapter - 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 interface IDatabaseSupplier<java.lang.Boolean>
        Parameters:
        translator - the translator to adjust DDL/DML/SQL statements to match the target database
        c - the JDBC connection
        Returns:
        the boolean. Returns true if data is available in the given table