Java 类org.apache.ibatis.annotations.CacheNamespaceRef 实例源码

项目:mybatis-plus-mini    文件:MybatisMapperAnnotationBuilder.java   
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;
        assistant.useCacheRef(namespace);
    }
}
项目:mybatis-plus    文件:MybatisMapperAnnotationBuilder.java   
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;
        assistant.useCacheRef(namespace);
    }
}
项目:mybatis-3    文件:MapperAnnotationBuilder.java   
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;
    assistant.useCacheRef(namespace);
  }
}
项目:MybatisCode    文件:MapperAnnotationBuilder.java   
private void parseCacheRef() {
  CacheNamespaceRef cacheDomainRef = type.getAnnotation(CacheNamespaceRef.class);
  if (cacheDomainRef != null) {
    assistant.useCacheRef(cacheDomainRef.value().getName());
  }
}
项目:mybatis    文件:MapperAnnotationBuilder.java   
private void parseCacheRef() {
  CacheNamespaceRef cacheDomainRef = type.getAnnotation(CacheNamespaceRef.class);
  if (cacheDomainRef != null) {
    assistant.useCacheRef(cacheDomainRef.value().getName());
  }
}
项目:mybaties    文件:MapperAnnotationBuilder.java   
private void parseCacheRef() {
  CacheNamespaceRef cacheDomainRef = type.getAnnotation(CacheNamespaceRef.class);
  if (cacheDomainRef != null) {
    assistant.useCacheRef(cacheDomainRef.value().getName());
  }
}
项目:play    文件:MapperAnnotationBuilder.java   
private void parseCacheRef() {
  CacheNamespaceRef cacheDomainRef = type.getAnnotation(CacheNamespaceRef.class);
  if (cacheDomainRef != null) {
    assistant.useCacheRef(cacheDomainRef.value().getName());
  }
}