Class JdbcH2Helper

java.lang.Object
org.nuiton.topia.persistence.jdbc.JdbcHelper
org.nuiton.topia.persistence.jdbc.JdbcH2Helper

public class JdbcH2Helper extends JdbcHelper
  • Constructor Details

  • Method Details

    • isTableExist

      public boolean isTableExist(String tableName)
    • isTableExist

      public boolean isTableExist(String schema, String tableName)

      Tests if a given table exists. WARNING : this may not work is the tableName is not exactly the same.

      This method is designed for H2 only.
      Parameters:
      schema - schema name filter
      tableName - table name filter
      Returns:
      true if table exists.
    • backup

      public void backup(File file, boolean compress)
      Backup database in gzip compressed file.
      Parameters:
      file - file to write backup
      compress - if true then use gzip to compress file
    • restore

      public void restore(File file) throws FileNotFoundException
      Read database from gzip compressed file
      Parameters:
      file - the source file to use for restore
      Throws:
      FileNotFoundException - if file does not exist
    • clear

      public void clear(boolean dropDatabase)