org.apache.ibatis.session.Configuration.getMappedStatements()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(139)

本文整理了Java中org.apache.ibatis.session.Configuration.getMappedStatements()方法的一些代码示例,展示了Configuration.getMappedStatements()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.getMappedStatements()方法的具体详情如下:
包路径:org.apache.ibatis.session.Configuration
类名称:Configuration
方法名:getMappedStatements

Configuration.getMappedStatements介绍

暂无

代码示例

代码示例来源:origin: abel533/Mapper

/**
 * 配置指定的接口
 *
 * @param configuration
 * @param mapperInterface
 */
public void processConfiguration(Configuration configuration, Class<?> mapperInterface) {
  String prefix;
  if (mapperInterface != null) {
    prefix = mapperInterface.getCanonicalName();
  } else {
    prefix = "";
  }
  for (Object object : new ArrayList<Object>(configuration.getMappedStatements())) {
    if (object instanceof MappedStatement) {
      MappedStatement ms = (MappedStatement) object;
      if (ms.getId().startsWith(prefix)) {
        processMappedStatement(ms);
      }
    }
  }
}

代码示例来源:origin: abel533/Mapper

/**
 * 配置指定的接口
 *
 * @param configuration
 * @param mapperInterface
 */
public void processConfiguration(Configuration configuration, Class<?> mapperInterface) {
  String prefix;
  if (mapperInterface != null) {
    prefix = mapperInterface.getCanonicalName();
  } else {
    prefix = "";
  }
  for (Object object : new ArrayList<Object>(configuration.getMappedStatements())) {
    if (object instanceof MappedStatement) {
      MappedStatement ms = (MappedStatement) object;
      if (ms.getId().startsWith(prefix)) {
        processMappedStatement(ms);
      }
    }
  }
}

代码示例来源:origin: tk.mybatis/mapper-core

/**
 * 配置指定的接口
 *
 * @param configuration
 * @param mapperInterface
 */
public void processConfiguration(Configuration configuration, Class<?> mapperInterface) {
  String prefix;
  if (mapperInterface != null) {
    prefix = mapperInterface.getCanonicalName();
  } else {
    prefix = "";
  }
  for (Object object : new ArrayList<Object>(configuration.getMappedStatements())) {
    if (object instanceof MappedStatement) {
      MappedStatement ms = (MappedStatement) object;
      if (ms.getId().startsWith(prefix)) {
        processMappedStatement(ms);
      }
    }
  }
}

代码示例来源:origin: com.github.abel533/mapper

Collection<MappedStatement> collection = configuration.getMappedStatements();

代码示例来源:origin: com.hand.hap.cloud/hap-mybatis-mapper-starter

/**
 * 配置指定的接口
 *
 * @param configuration
 * @param mapperInterface
 */
public void processConfiguration(Configuration configuration, Class<?> mapperInterface) {
  String prefix;
  if (mapperInterface != null) {
    prefix = mapperInterface.getCanonicalName();
  } else {
    prefix = "";
  }
  new ArrayList<Object>(configuration.getMappedStatements()).forEach(object -> {
    if (object instanceof MappedStatement) {
      MappedStatement ms = (MappedStatement) object;
      if (ms.getId().startsWith(prefix) && isMapperMethod(ms.getId())) {
        if (ms.getSqlSource() instanceof ProviderSqlSource) {
          setSqlSource(ms);
        }
      }
    }
  });
}

代码示例来源:origin: com.gitee.hengboy/mybatis-enhance-core

mappedStatementSupport.support(new ArrayList(configuration.getMappedStatements()));
logger.debug("All the MappedStatement SqlSource loading in >> {} << is completed.", mapperInterface.getName());

相关文章

Configuration类方法