|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectliquibase.executor.AbstractExecutor
liquibase.executor.jvm.JdbcExecutor
public class JdbcExecutor
Class to simplify execution of SqlStatements. Based heavily on Spring's JdbcTemplate.
Note: This class is currently intended for Liquibase-internal use only and may change without notice in the future
Field Summary |
---|
Fields inherited from class liquibase.executor.AbstractExecutor |
---|
database |
Constructor Summary | |
---|---|
JdbcExecutor()
|
Method Summary | |
---|---|
Map |
call(CallableSqlStatement csc,
List declaredParameters,
List<SqlVisitor> sqlVisitors)
|
void |
comment(String message)
Adds a comment to the database. |
CallableStatement |
createCallableStatement(StoredProcedureStatement statement,
Database database)
|
Object |
execute(CallableSqlStatement csc,
liquibase.executor.jvm.CallableStatementCallback action,
List<SqlVisitor> sqlVisitors)
|
void |
execute(SqlStatement sql)
Write methods |
void |
execute(SqlStatement sql,
List<SqlVisitor> sqlVisitors)
|
Object |
execute(liquibase.executor.jvm.StatementCallback action,
List<SqlVisitor> sqlVisitors)
|
protected RowMapper |
getColumnMapRowMapper()
Create a new RowMapper for reading columns as key-value pairs. |
protected RowMapper |
getSingleColumnRowMapper(Class requiredType)
Create a new RowMapper for reading result objects from a single column. |
Object |
query(SqlStatement sql,
liquibase.executor.jvm.ResultSetExtractor rse)
|
Object |
query(SqlStatement sql,
liquibase.executor.jvm.ResultSetExtractor rse,
List<SqlVisitor> sqlVisitors)
|
List |
query(SqlStatement sql,
RowMapper rowMapper)
|
List |
query(SqlStatement sql,
RowMapper rowMapper,
List<SqlVisitor> sqlVisitors)
|
int |
queryForInt(SqlStatement sql)
|
int |
queryForInt(SqlStatement sql,
List<SqlVisitor> sqlVisitors)
|
List<Map> |
queryForList(SqlStatement sql)
|
List |
queryForList(SqlStatement sql,
Class elementType)
|
List |
queryForList(SqlStatement sql,
Class elementType,
List<SqlVisitor> sqlVisitors)
|
List<Map> |
queryForList(SqlStatement sql,
List<SqlVisitor> sqlVisitors)
|
long |
queryForLong(SqlStatement sql)
|
long |
queryForLong(SqlStatement sql,
List<SqlVisitor> sqlVisitors)
|
Object |
queryForObject(SqlStatement sql,
Class requiredType)
Read methods |
Object |
queryForObject(SqlStatement sql,
Class requiredType,
List<SqlVisitor> sqlVisitors)
|
Object |
queryForObject(SqlStatement sql,
RowMapper rowMapper)
|
Object |
queryForObject(SqlStatement sql,
RowMapper rowMapper,
List<SqlVisitor> sqlVisitors)
|
int |
update(SqlStatement sql)
|
int |
update(SqlStatement sql,
List<SqlVisitor> sqlVisitors)
|
boolean |
updatesDatabase()
|
Methods inherited from class liquibase.executor.AbstractExecutor |
---|
applyVisitors, setDatabase |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface liquibase.executor.Executor |
---|
setDatabase |
Constructor Detail |
---|
public JdbcExecutor()
Method Detail |
---|
public boolean updatesDatabase()
updatesDatabase
in interface Executor
public Object execute(liquibase.executor.jvm.StatementCallback action, List<SqlVisitor> sqlVisitors) throws DatabaseException
DatabaseException
public void execute(SqlStatement sql) throws DatabaseException
Executor
execute
in interface Executor
DatabaseException
public void execute(SqlStatement sql, List<SqlVisitor> sqlVisitors) throws DatabaseException
execute
in interface Executor
DatabaseException
public Object query(SqlStatement sql, liquibase.executor.jvm.ResultSetExtractor rse) throws DatabaseException
DatabaseException
public Object query(SqlStatement sql, liquibase.executor.jvm.ResultSetExtractor rse, List<SqlVisitor> sqlVisitors) throws DatabaseException
DatabaseException
public List query(SqlStatement sql, RowMapper rowMapper) throws DatabaseException
DatabaseException
public List query(SqlStatement sql, RowMapper rowMapper, List<SqlVisitor> sqlVisitors) throws DatabaseException
DatabaseException
public Object queryForObject(SqlStatement sql, RowMapper rowMapper) throws DatabaseException
DatabaseException
public Object queryForObject(SqlStatement sql, RowMapper rowMapper, List<SqlVisitor> sqlVisitors) throws DatabaseException
DatabaseException
public Object queryForObject(SqlStatement sql, Class requiredType) throws DatabaseException
Executor
queryForObject
in interface Executor
DatabaseException
public Object queryForObject(SqlStatement sql, Class requiredType, List<SqlVisitor> sqlVisitors) throws DatabaseException
queryForObject
in interface Executor
DatabaseException
public long queryForLong(SqlStatement sql) throws DatabaseException
queryForLong
in interface Executor
DatabaseException
public long queryForLong(SqlStatement sql, List<SqlVisitor> sqlVisitors) throws DatabaseException
queryForLong
in interface Executor
DatabaseException
public int queryForInt(SqlStatement sql) throws DatabaseException
queryForInt
in interface Executor
DatabaseException
public int queryForInt(SqlStatement sql, List<SqlVisitor> sqlVisitors) throws DatabaseException
queryForInt
in interface Executor
DatabaseException
public List queryForList(SqlStatement sql, Class elementType) throws DatabaseException
queryForList
in interface Executor
DatabaseException
public List queryForList(SqlStatement sql, Class elementType, List<SqlVisitor> sqlVisitors) throws DatabaseException
queryForList
in interface Executor
DatabaseException
public List<Map> queryForList(SqlStatement sql) throws DatabaseException
queryForList
in interface Executor
DatabaseException
public List<Map> queryForList(SqlStatement sql, List<SqlVisitor> sqlVisitors) throws DatabaseException
queryForList
in interface Executor
DatabaseException
public int update(SqlStatement sql) throws DatabaseException
update
in interface Executor
DatabaseException
public int update(SqlStatement sql, List<SqlVisitor> sqlVisitors) throws DatabaseException
update
in interface Executor
DatabaseException
public Object execute(CallableSqlStatement csc, liquibase.executor.jvm.CallableStatementCallback action, List<SqlVisitor> sqlVisitors) throws DatabaseException
DatabaseException
public CallableStatement createCallableStatement(StoredProcedureStatement statement, Database database) throws SQLException
SQLException
public Map call(CallableSqlStatement csc, List declaredParameters, List<SqlVisitor> sqlVisitors) throws DatabaseException
call
in interface Executor
DatabaseException
protected RowMapper getColumnMapRowMapper()
ColumnMapRowMapper
protected RowMapper getSingleColumnRowMapper(Class requiredType)
requiredType
- the type that each result object is expected to match
SingleColumnRowMapper
public void comment(String message) throws DatabaseException
Executor
comment
in interface Executor
DatabaseException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |