Class JdbcH2Helper
java.lang.Object
org.nuiton.topia.persistence.jdbc.JdbcHelper
org.nuiton.topia.persistence.jdbc.JdbcH2Helper
-
Field Summary
Fields inherited from class org.nuiton.topia.persistence.jdbc.JdbcHelper
jdbcConfiguration -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidBackup database in gzip compressed file.voidclear(boolean dropDatabase) booleanisTableExist(String tableName) booleanisTableExist(String schema, String tableName) Tests if a given table exists.voidRead database from gzip compressed fileMethods inherited from class org.nuiton.topia.persistence.jdbc.JdbcHelper
closeQuietly, closeQuietly, closeQuietly, createSchema, getJdbcDriver, openConnection, registerDriver, runSelectOnString, runUpdate
-
Constructor Details
-
JdbcH2Helper
-
-
Method Details
-
isTableExist
-
isTableExist
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 filtertableName- table name filter- Returns:
trueif table exists.
-
backup
Backup database in gzip compressed file.- Parameters:
file- file to write backupcompress- if true then use gzip to compress file
-
restore
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)
-