| Constructor and Description |
|---|
BaseAccessor() |
BaseAccessor(IAccessorConfig accessorConfig) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doSetupStatement(Statement statement) |
IAccessorConfig |
getAccessorConfig()
获取访问器配置对象
|
CallableStatement |
getCallableStatement(Connection conn,
String sql)
使用CallableStatement方式进行数据库访问操作,用于访问存储过程
|
PreparedStatement |
getPreparedStatement(Connection conn,
String sql)
使用PreparedStatement(参数化)方式进行数据库访问操作,用于直接使用SQL文
|
Statement |
getStatement(Connection conn)
使用Statement方式进行数据库访问操作,用于直接使用SQL文
|
void |
setAccessorConfig(IAccessorConfig accessorConfig) |
public BaseAccessor()
public BaseAccessor(IAccessorConfig accessorConfig)
protected void doSetupStatement(Statement statement) throws SQLException
SQLExceptionpublic Statement getStatement(Connection conn) throws Exception
IAccessorgetStatement in interface IAccessorconn - 连接对象Exception - 可能产生的异常public PreparedStatement getPreparedStatement(Connection conn, String sql) throws Exception
IAccessorgetPreparedStatement in interface IAccessorconn - 访问数据库的连接对象sql - 预执行的SQL语句Exception - 可能产生的异常public CallableStatement getCallableStatement(Connection conn, String sql) throws Exception
IAccessorgetCallableStatement in interface IAccessorconn - 访问数据库的连接对象sql - 预执行的SQL语句Exception - 可能产生的异常public IAccessorConfig getAccessorConfig()
IAccessorgetAccessorConfig in interface IAccessorpublic void setAccessorConfig(IAccessorConfig accessorConfig)
Copyright © 2022. All rights reserved.