public abstract class BaseDBProcess extends Object implements DBProcess
Modifier and Type | Field and Description |
---|---|
protected Connection |
connection |
Constructor and Description |
---|
BaseDBProcess() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
doHasTable(String tableName) |
protected boolean |
hasColumn(String tableName,
String columnName) |
protected boolean |
hasColumnType(Class<?> tableClass,
String columnName,
String columnType) |
protected boolean |
hasRows(Connection connection,
String tableName) |
protected boolean |
hasRows(String tableName) |
protected boolean |
hasTable(String tableName) |
void |
runSQL(Connection connection,
String template) |
void |
runSQL(DBTypeToSQLMap dbTypeToSQLMap) |
void |
runSQL(String template) |
void |
runSQL(String[] templates) |
void |
runSQLTemplate(String path) |
void |
runSQLTemplate(String path,
boolean failOnError) |
void |
runSQLTemplateString(String template,
boolean evaluate,
boolean failOnError) |
public void runSQL(Connection connection, String template) throws IOException, SQLException
public void runSQL(DBTypeToSQLMap dbTypeToSQLMap) throws IOException, SQLException
public void runSQL(String template) throws IOException, SQLException
public void runSQL(String[] templates) throws IOException, SQLException
public void runSQLTemplate(String path) throws IOException, javax.naming.NamingException, SQLException
runSQLTemplate
in interface DBProcess
IOException
javax.naming.NamingException
SQLException
public void runSQLTemplate(String path, boolean failOnError) throws IOException, javax.naming.NamingException, SQLException
runSQLTemplate
in interface DBProcess
IOException
javax.naming.NamingException
SQLException
public void runSQLTemplateString(String template, boolean evaluate, boolean failOnError) throws IOException, javax.naming.NamingException, SQLException
runSQLTemplateString
in interface DBProcess
IOException
javax.naming.NamingException
SQLException
protected boolean doHasTable(String tableName) throws Exception
Exception
protected boolean hasColumn(String tableName, String columnName) throws Exception
Exception
protected boolean hasColumnType(Class<?> tableClass, String columnName, String columnType) throws Exception
Exception
protected boolean hasRows(Connection connection, String tableName)
protected boolean hasRows(String tableName) throws Exception
Exception
protected boolean hasTable(String tableName) throws Exception
Exception