public class JDBCDataAccessObjectTemplate
extends java.lang.Object
implements java.io.Serializable
构造器和说明 |
---|
JDBCDataAccessObjectTemplate() |
限定符和类型 | 方法和说明 |
---|---|
void |
execute(DML dml)
执行数据库操作
|
java.io.Serializable |
execute(Insert insert,
boolean returnIdentifier)
执行语句
|
void |
execute(java.lang.String sql)
执行查询
|
int |
executeDelete(Delete delete)
执行删除
|
<T> T |
executeQuery(Select select,
ResultSetExtractor<T> rse)
执行查询
|
int |
executeUpdate(Update update)
执行更新
|
<T> T |
query(java.lang.String sql,
ResultSetExtractor<T> rse)
执行查询
|
void |
setConn(java.sql.Connection conn) |
void |
setDialect(Dialect dialect) |
void |
setForeignKeyChecks(int keyChecks)
设置外键约束
|
void |
setTransaction(boolean transaction) |
public void setConn(java.sql.Connection conn)
public void setTransaction(boolean transaction)
public void setDialect(Dialect dialect)
public void execute(java.lang.String sql) throws java.lang.Exception
sql
- 查询语句java.lang.Exception
public <T> T query(java.lang.String sql, ResultSetExtractor<T> rse) throws java.lang.Exception
sql
- 查询语句rse
- 结果集java.lang.Exception
public <T> T executeQuery(Select select, ResultSetExtractor<T> rse) throws java.lang.Exception
select
- 查询语句rse
- 结果集java.lang.Exception
public java.io.Serializable execute(Insert insert, boolean returnIdentifier) throws java.lang.Exception
insert
- 插入语句returnIdentifier
- 返回标记java.lang.Exception
public void execute(DML dml) throws java.lang.Exception
dml
- 数据库操作java.lang.Exception
public int executeDelete(Delete delete) throws java.lang.Exception
delete
- 删除操作java.lang.Exception
public int executeUpdate(Update update) throws java.lang.Exception
update
- 更新操作java.lang.Exception
public void setForeignKeyChecks(int keyChecks)