Refactor/findannotation (#1104)

* refactor: renamed findAnnotation method that searches recursive to findAnnotationRecursive

* CHG: searching namedQueries & indices also recursive in superclasses

* FIX: Using the AnnotationBase methods on several places and documented them
This commit is contained in:
Roland Praml
2017-09-01 20:25:10 +12:00
committed by Rob Bygrave
parent e908d16ba8
commit 46cdc84e6b
10 changed files with 87 additions and 60 deletions
@@ -7,6 +7,7 @@ import io.ebean.cache.ServerCacheFactory;
import io.ebean.cache.ServerCacheOptions;
import io.ebean.cache.ServerCacheType;
import io.ebean.config.CurrentTenantProvider;
import io.ebeaninternal.server.deploy.parse.AnnotationBase;
import java.util.concurrent.ConcurrentHashMap;
@@ -82,7 +83,7 @@ class DefaultCacheHolder {
}
private ServerCacheOptions getQueryOptions(Class<?> cls) {
CacheQueryTuning tuning = cls.getAnnotation(CacheQueryTuning.class);
CacheQueryTuning tuning = AnnotationBase.findAnnotation(cls, CacheQueryTuning.class);
if (tuning != null) {
return new ServerCacheOptions(tuning).applyDefaults(queryDefault);
}