Class H2DataAccess

All Implemented Interfaces:
JKDataAccessService

public class H2DataAccess extends JKDataAccessImpl
This class provides H2-specific functionality for data access operations.

It extends the JKDataAccessImpl class.

Version:
1.0
Author:
Dr. Jalal H. Kiswani
  • Constructor Details

    • H2DataAccess

      public H2DataAccess(JKDataSource dataSource)
      This method constructs a new H2DataAccess with the provided data source.
      Parameters:
      dataSource - Specifies the data source.
  • Method Details

    • runScript

      public void runScript(String fileName)
      This method runs a SQL script from a specified file.
      Specified by:
      runScript in interface JKDataAccessService
      Overrides:
      runScript in class JKDataAccessImpl
      Parameters:
      fileName - Specifies the name of the file containing the SQL script to execute.
    • getSystemDate

      public Date getSystemDate()
      This method retrieves the current system date and time from the database.
      Specified by:
      getSystemDate in interface JKDataAccessService
      Overrides:
      getSystemDate in class JKDataAccessImpl
      Returns:
      a Date object representing the current system date and time
    • describeTable

      public Map<String,String> describeTable(String name)
      This method retrieves data about a database table and returns it as a map of column names to their corresponding data types.
      Specified by:
      describeTable in interface JKDataAccessService
      Overrides:
      describeTable in class JKDataAccessImpl
      Parameters:
      name - Specifies the name of the table to describe.
      Returns:
      the map containing column names as keys and their corresponding data types as values.