#118 - Additional: Add query includeSoftDeletes() asDraft() to ExpressionList (for fluid style when added after predicates)

This commit is contained in:
Robin Bygrave
2015-12-03 17:42:26 +13:00
parent 337646a6ce
commit 8318bbc4ca
5 changed files with 31 additions and 5 deletions
@@ -107,6 +107,16 @@ public interface ExpressionList<T> extends Serializable {
*/
Query<T> asOf(Timestamp asOf);
/**
* Execute the query against the draft set of tables.
*/
Query<T> asDraft();
/**
* Execute the query including soft deleted rows.
*/
Query<T> includeSoftDeletes();
/**
* Execute as a delete query deleting the 'root level' beans that match the predicates
* in the query.
@@ -234,6 +234,16 @@ abstract class JunctionExpression<T> implements Junction<T>, SpiExpression, Expr
return exprList.asOf(asOf);
}
@Override
public Query<T> asDraft() {
return exprList.asDraft();
}
@Override
public Query<T> includeSoftDeletes() {
return exprList.includeSoftDeletes();
}
@Override
public List<Version<T>> findVersions() {
return exprList.findVersions();
@@ -121,6 +121,16 @@ public class DefaultExpressionList<T> implements SpiExpressionList<T> {
return query.asOf(asOf);
}
@Override
public Query<T> asDraft() {
return query.asDraft();
}
@Override
public Query<T> includeSoftDeletes() {
return query.includeSoftDeletes();
}
@Override
public List<Version<T>> findVersions() {
return query.findVersions();