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

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

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

Configuration.addIncompleteCacheRef介绍

暂无

代码示例

代码示例来源:origin: baomidou/mybatis-plus

private void parseCacheRef() {
  CacheNamespaceRef cacheDomainRef = type.getAnnotation(CacheNamespaceRef.class);
  if (cacheDomainRef != null) {
    Class<?> refType = cacheDomainRef.value();
    String refName = cacheDomainRef.name();
    if (refType == void.class && refName.isEmpty()) {
      throw new BuilderException("Should be specified either value() or name() attribute in the @CacheNamespaceRef");
    }
    if (refType != void.class && !refName.isEmpty()) {
      throw new BuilderException("Cannot use both value() and name() attribute in the @CacheNamespaceRef");
    }
    String namespace = (refType != void.class) ? refType.getName() : refName;
    try {
      assistant.useCacheRef(namespace);
    } catch (IncompleteElementException e) {
      configuration.addIncompleteCacheRef(new CacheRefResolver(assistant, namespace));
    }
  }
}

代码示例来源:origin: org.mybatis/mybatis

private void parseCacheRef() {
 CacheNamespaceRef cacheDomainRef = type.getAnnotation(CacheNamespaceRef.class);
 if (cacheDomainRef != null) {
  Class<?> refType = cacheDomainRef.value();
  String refName = cacheDomainRef.name();
  if (refType == void.class && refName.isEmpty()) {
   throw new BuilderException("Should be specified either value() or name() attribute in the @CacheNamespaceRef");
  }
  if (refType != void.class && !refName.isEmpty()) {
   throw new BuilderException("Cannot use both value() and name() attribute in the @CacheNamespaceRef");
  }
  String namespace = (refType != void.class) ? refType.getName() : refName;
  try {
   assistant.useCacheRef(namespace);
  } catch (IncompleteElementException e) {
   configuration.addIncompleteCacheRef(new CacheRefResolver(assistant, namespace));
  }
 }
}

代码示例来源:origin: camunda/camunda-bpm-platform

private void cacheRefElement(XNode context) {
 if (context != null) {
  configuration.addCacheRef(builderAssistant.getCurrentNamespace(), context.getStringAttribute("namespace"));
  CacheRefResolver cacheRefResolver = new CacheRefResolver(builderAssistant, context.getStringAttribute("namespace"));
  try {
   cacheRefResolver.resolveCacheRef();
  } catch (IncompleteElementException e) {
   configuration.addIncompleteCacheRef(cacheRefResolver);
  }
 }
}

代码示例来源:origin: org.mybatis/mybatis

private void cacheRefElement(XNode context) {
 if (context != null) {
  configuration.addCacheRef(builderAssistant.getCurrentNamespace(), context.getStringAttribute("namespace"));
  CacheRefResolver cacheRefResolver = new CacheRefResolver(builderAssistant, context.getStringAttribute("namespace"));
  try {
   cacheRefResolver.resolveCacheRef();
  } catch (IncompleteElementException e) {
   configuration.addIncompleteCacheRef(cacheRefResolver);
  }
 }
}

相关文章

Configuration类方法