mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-06 08:33:18 +00:00
#1796 - ENH: add query.fetchCache(path) ... for explicitly building part of graph from L2 cache
This commit is contained in:
1 parent
9155716752
commit
9674711516
20 files changed
+319
-54
No files matched your search
@@ -43,6 +43,8 @@ import java.util.function.Predicate;
|
||||
*/
|
||||
class DefaultFetchGroupQuery<T> implements SpiFetchGroupQuery<T> {
|
||||
|
||||
private static final FetchConfig FETCH_CACHE = new FetchConfig().cache();
|
||||
|
||||
private static final FetchConfig FETCH_QUERY = new FetchConfig().query();
|
||||
|
||||
private static final FetchConfig FETCH_LAZY = new FetchConfig().lazy();
|
||||
@@ -76,6 +78,11 @@ class DefaultFetchGroupQuery<T> implements SpiFetchGroupQuery<T> {
|
||||
return fetch(property, null, FETCH_QUERY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Query<T> fetchCache(String property) {
|
||||
return fetch(property, null, FETCH_CACHE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Query<T> fetchLazy(String property) {
|
||||
return fetch(property, null, FETCH_LAZY);
|
||||
@@ -96,6 +103,11 @@ class DefaultFetchGroupQuery<T> implements SpiFetchGroupQuery<T> {
|
||||
return fetch(property, columns, FETCH_QUERY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Query<T> fetchCache(String property, String columns) {
|
||||
return fetch(property, columns, FETCH_CACHE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Query<T> fetchLazy(String property, String columns) {
|
||||
return fetch(property, columns, FETCH_LAZY);
|
||||
|
||||
Reference in new issue
Block a user