mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#582 - ElasticSearch: Add setUseDocStore(true) on ExpressionList ... for fluid query style
This commit is contained in:
@@ -380,6 +380,32 @@ public interface ExpressionList<T> extends Serializable {
|
||||
*/
|
||||
Query<T> setUseQueryCache(boolean useCache);
|
||||
|
||||
/**
|
||||
* Set to true if this query should execute against the doc store.
|
||||
* <p>
|
||||
* When setting this you may also consider disabling lazy loading.
|
||||
* </p>
|
||||
*/
|
||||
Query<T> setUseDocStore(boolean useDocsStore);
|
||||
|
||||
/**
|
||||
* Set true if you want to disable lazy loading.
|
||||
* <p>
|
||||
* That is, once the object graph is returned further lazy loading is disabled.
|
||||
* </p>
|
||||
*/
|
||||
Query<T> setDisableLazyLoading(boolean disableLazyLoading);
|
||||
|
||||
/**
|
||||
* Disable read auditing for this query.
|
||||
* <p>
|
||||
* This is intended to be used when the query is not a user initiated query and instead
|
||||
* part of the internal processing in an application to load a cache or document store etc.
|
||||
* In these cases we don't want the query to be part of read auditing.
|
||||
* </p>
|
||||
*/
|
||||
Query<T> setDisableReadAuditing();
|
||||
|
||||
/**
|
||||
* Add expressions to the having clause.
|
||||
* <p>
|
||||
|
||||
@@ -324,6 +324,21 @@ public class DefaultExpressionList<T> implements SpiExpressionList<T> {
|
||||
return query.setUseQueryCache(useCache);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Query<T> setUseDocStore(boolean useDocsStore) {
|
||||
return query.setUseDocStore(useDocsStore);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Query<T> setDisableLazyLoading(boolean disableLazyLoading) {
|
||||
return query.setDisableLazyLoading(disableLazyLoading);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Query<T> setDisableReadAuditing() {
|
||||
return query.setDisableReadAuditing();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExpressionList<T> having() {
|
||||
return query.having();
|
||||
|
||||
@@ -44,7 +44,7 @@ abstract class JunctionExpression<T> implements Junction<T>, SpiExpression, Expr
|
||||
|
||||
private static final long serialVersionUID = -645619859900030678L;
|
||||
|
||||
Conjunction(com.avaje.ebean.Query<T> query, ExpressionList<T> parent) {
|
||||
Conjunction(Query<T> query, ExpressionList<T> parent) {
|
||||
super(false, AND, query, parent);
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ abstract class JunctionExpression<T> implements Junction<T>, SpiExpression, Expr
|
||||
|
||||
private static final long serialVersionUID = -8464470066692221413L;
|
||||
|
||||
Disjunction(com.avaje.ebean.Query<T> query, ExpressionList<T> parent) {
|
||||
Disjunction(Query<T> query, ExpressionList<T> parent) {
|
||||
super(true, OR, query, parent);
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ abstract class JunctionExpression<T> implements Junction<T>, SpiExpression, Expr
|
||||
*/
|
||||
private final boolean disjunction;
|
||||
|
||||
JunctionExpression(boolean disjunction, String joinType, com.avaje.ebean.Query<T> query, ExpressionList<T> parent) {
|
||||
JunctionExpression(boolean disjunction, String joinType, Query<T> query, ExpressionList<T> parent) {
|
||||
this.disjunction = disjunction;
|
||||
this.joinType = joinType;
|
||||
this.exprList = new DefaultExpressionList<T>(query, parent);
|
||||
@@ -532,7 +532,7 @@ abstract class JunctionExpression<T> implements Junction<T>, SpiExpression, Expr
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExpressionList<T> in(String propertyName, com.avaje.ebean.Query<?> subQuery) {
|
||||
public ExpressionList<T> in(String propertyName, Query<?> subQuery) {
|
||||
return exprList.in(propertyName, subQuery);
|
||||
}
|
||||
|
||||
@@ -547,7 +547,7 @@ abstract class JunctionExpression<T> implements Junction<T>, SpiExpression, Expr
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExpressionList<T> notIn(String propertyName, com.avaje.ebean.Query<?> subQuery) {
|
||||
public ExpressionList<T> notIn(String propertyName, Query<?> subQuery) {
|
||||
return exprList.notIn(propertyName, subQuery);
|
||||
}
|
||||
|
||||
@@ -612,7 +612,7 @@ abstract class JunctionExpression<T> implements Junction<T>, SpiExpression, Expr
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.avaje.ebean.Query<T> order(String orderByClause) {
|
||||
public Query<T> order(String orderByClause) {
|
||||
return exprList.order(orderByClause);
|
||||
}
|
||||
|
||||
@@ -622,12 +622,12 @@ abstract class JunctionExpression<T> implements Junction<T>, SpiExpression, Expr
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.avaje.ebean.Query<T> orderBy(String orderBy) {
|
||||
public Query<T> orderBy(String orderBy) {
|
||||
return exprList.orderBy(orderBy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.avaje.ebean.Query<T> query() {
|
||||
public Query<T> query() {
|
||||
return exprList.query();
|
||||
}
|
||||
|
||||
@@ -647,7 +647,7 @@ abstract class JunctionExpression<T> implements Junction<T>, SpiExpression, Expr
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.avaje.ebean.Query<T> select(String properties) {
|
||||
public Query<T> select(String properties) {
|
||||
return exprList.select(properties);
|
||||
}
|
||||
|
||||
@@ -657,27 +657,27 @@ abstract class JunctionExpression<T> implements Junction<T>, SpiExpression, Expr
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.avaje.ebean.Query<T> setFirstRow(int firstRow) {
|
||||
public Query<T> setFirstRow(int firstRow) {
|
||||
return exprList.setFirstRow(firstRow);
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.avaje.ebean.Query<T> setMapKey(String mapKey) {
|
||||
public Query<T> setMapKey(String mapKey) {
|
||||
return exprList.setMapKey(mapKey);
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.avaje.ebean.Query<T> setMaxRows(int maxRows) {
|
||||
public Query<T> setMaxRows(int maxRows) {
|
||||
return exprList.setMaxRows(maxRows);
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.avaje.ebean.Query<T> setOrderBy(String orderBy) {
|
||||
public Query<T> setOrderBy(String orderBy) {
|
||||
return exprList.setOrderBy(orderBy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.avaje.ebean.Query<T> setUseCache(boolean useCache) {
|
||||
public Query<T> setUseCache(boolean useCache) {
|
||||
return exprList.setUseCache(useCache);
|
||||
}
|
||||
|
||||
@@ -686,6 +686,21 @@ abstract class JunctionExpression<T> implements Junction<T>, SpiExpression, Expr
|
||||
return exprList.setUseQueryCache(useCache);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Query<T> setUseDocStore(boolean useDocsStore) {
|
||||
return exprList.setUseDocStore(useDocsStore);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Query<T> setDisableLazyLoading(boolean disableLazyLoading) {
|
||||
return exprList.setDisableLazyLoading(disableLazyLoading);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Query<T> setDisableReadAuditing() {
|
||||
return exprList.setDisableReadAuditing();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExpressionList<T> startsWith(String propertyName, String value) {
|
||||
return exprList.startsWith(propertyName, value);
|
||||
|
||||
Reference in New Issue
Block a user