java基础-ibatis关键接口和类

关键接口和类,我们以经典的2.X版本来介绍,ibatis整体的设计还是非常清晰,明了的。


public interface Nodelet { 节点接口
public class NodeletParser { 节点解析类

public interface TypeHandler {    类型操作接口
public abstract class BaseTypeHandler implements TypeHandler {
public class TypeHandlerFactory { 类型操作工厂

public interface DataExchange {  数据交互接口,用来在参数映射/结果映射和关联对象之间的交换
public class DataExchangeFactory { 数据交换工厂

public class SqlMapParser { sql映射解析
public class SqlMapConfigParser { sql映射配置解析

public interface SqlMapExecutor { sql映射执行接口
public interface SqlMapTransactionManager { sql映射事务管理接口

public interface SqlMapClient extends SqlMapExecutor, SqlMapTransactionManager { sql映射客户操作接口
public class SqlMapClientImpl implements SqlMapClient, ExtendedSqlMapClient { sql映射客户操作实现类
public class SqlMapClientBuilder { sql映射客户操作

public interface SqlMapSession extends SqlMapExecutor, SqlMapTransactionManager { sql映射会话接口
public class SqlMapSessionImpl implements SqlMapSession { // 会实例化一个SessionScope

public class SqlMapExecutorDelegate { sql映射执行代理
public class SessionScope {  会话范围
public class StatementScope { 声明范围
public class MappedStatement { 映射声明类,真正的执行sql的类
   public int executeUpdate(StatementScope statementScope, Transaction trans, Object parameterObject)
   public Object executeQueryForObject(StatementScope statementScope, Transaction trans, Object parameterObject, Object  resultObject)
   public List executeQueryForList(StatementScope statementScope, Transaction trans, Object parameterObject, int skipResults, int maxResults)


public interface Transaction { 事物接口
public class JdbcTransaction implements Transaction { jdbc事务
public class TransactionManager { 事务管理
public interface TransactionConfig { 事务配置接口
public abstract class BaseTransactionConfig implements TransactionConfig { 基本的事务配置类
public class JdbcTransactionConfig extends BaseTransactionConfig { jdbc事务配置类

public interface RowHandler {  行操作接口
public class DefaultRowHandler implements RowHandler { 默认的行操作类
public class RowHandlerCallback { 行操作回调类
public class SqlExecutor { sql执行类
      public void executeQuery(StatementScope statementScope, Connection conn, String sql, Object[] parameters, int skipResults, int maxResults, RowHandlerCallback callback) throws SQLException {

      private void handleResults(StatementScope statementScope, ResultSet rs, int skipResults, int maxResults, RowHandlerCallback callback) throws SQLException {

      private void handleResults(StatementScope statementScope, ResultSet rs, int skipResults, int maxResults, RowHandlerCallback callback) throws SQLException {

...


public class ParameterMap { 参数映射
public class ResultMap { 结果映射

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值