mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-18 14:58:47 +00:00
Refactor internals of batch lazy loading and query fetches
This commit is contained in:
1 parent
e685e2f4ac
commit
05dcdf162b
28 files changed
+661
-981
No files matched your search
@@ -33,13 +33,13 @@ public class DefaultExpressionList<T> implements SpiExpressionList<T> {
|
||||
|
||||
private static final long serialVersionUID = -6992345500247035947L;
|
||||
|
||||
private final ArrayList<SpiExpression> list = new ArrayList<SpiExpression>();
|
||||
protected final ArrayList<SpiExpression> list = new ArrayList<SpiExpression>();
|
||||
|
||||
private final Query<T> query;
|
||||
protected final Query<T> query;
|
||||
|
||||
private final ExpressionList<T> parentExprList;
|
||||
protected final ExpressionList<T> parentExprList;
|
||||
|
||||
private transient ExpressionFactory expr;
|
||||
protected transient ExpressionFactory expr;
|
||||
|
||||
private final String exprLang;
|
||||
private final String listAndStart;
|
||||
@@ -69,7 +69,7 @@ public class DefaultExpressionList<T> implements SpiExpressionList<T> {
|
||||
}
|
||||
}
|
||||
|
||||
public void trimPath(int prefixTrim) {
|
||||
public SpiExpressionList<?> trimPath(int prefixTrim) {
|
||||
throw new RuntimeException("Only allowed on FilterExpressionList");
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.avaje.ebean.OrderBy;
|
||||
import com.avaje.ebean.PagingList;
|
||||
import com.avaje.ebean.Query;
|
||||
import com.avaje.ebean.QueryListener;
|
||||
import com.avaje.ebeaninternal.api.SpiExpressionList;
|
||||
import com.avaje.ebeaninternal.server.expression.FilterExprPath;
|
||||
|
||||
public class FilterExpressionList<T> extends DefaultExpressionList<T> {
|
||||
@@ -31,8 +32,8 @@ public class FilterExpressionList<T> extends DefaultExpressionList<T> {
|
||||
this.rootQuery = rootQuery;
|
||||
}
|
||||
|
||||
public void trimPath(int prefixTrim) {
|
||||
pathPrefix.trimPath(prefixTrim);
|
||||
public SpiExpressionList<?> trimPath(int prefixTrim) {
|
||||
return new FilterExpressionList<T>(pathPrefix.trimPath(prefixTrim), expr, rootQuery);
|
||||
}
|
||||
|
||||
public FilterExprPath getPathPrefix() {
|
||||
|
||||
Reference in new issue
Block a user