mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-13 21:01:01 +08:00
Merge pull request #2563 from jwgmeligmeyling/comparable-expression-inconsistency
Fix inconsistency between final and non-final methods in ComparableExpression, ComparableExpressionBase and SimpleExpression
This commit is contained in:
commit
78cd6ae97b
@ -51,7 +51,7 @@ public abstract class ComparableExpression<T extends Comparable> extends Compara
|
||||
* @param to inclusive end of range
|
||||
* @return this between from and to
|
||||
*/
|
||||
public final BooleanExpression between(@Nullable T from, @Nullable T to) {
|
||||
public BooleanExpression between(@Nullable T from, @Nullable T to) {
|
||||
if (from == null) {
|
||||
if (to != null) {
|
||||
return Expressions.booleanOperation(Ops.LOE, mixin, ConstantImpl.create(to));
|
||||
@ -74,7 +74,7 @@ public abstract class ComparableExpression<T extends Comparable> extends Compara
|
||||
* @param to inclusive end of range
|
||||
* @return this between from and to
|
||||
*/
|
||||
public final BooleanExpression between(@Nullable Expression<T> from, @Nullable Expression<T> to) {
|
||||
public BooleanExpression between(@Nullable Expression<T> from, @Nullable Expression<T> to) {
|
||||
if (from == null) {
|
||||
if (to != null) {
|
||||
return Expressions.booleanOperation(Ops.LOE, mixin, to);
|
||||
@ -98,7 +98,7 @@ public abstract class ComparableExpression<T extends Comparable> extends Compara
|
||||
* @param to inclusive end of range
|
||||
* @return this not between from and to
|
||||
*/
|
||||
public final BooleanExpression notBetween(T from, T to) {
|
||||
public BooleanExpression notBetween(T from, T to) {
|
||||
return between(from, to).not();
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ public abstract class ComparableExpression<T extends Comparable> extends Compara
|
||||
* @param to inclusive end of range
|
||||
* @return this not between from and to
|
||||
*/
|
||||
public final BooleanExpression notBetween(Expression<T> from, Expression<T> to) {
|
||||
public BooleanExpression notBetween(Expression<T> from, Expression<T> to) {
|
||||
return between(from, to).not();
|
||||
}
|
||||
|
||||
@ -246,7 +246,7 @@ public abstract class ComparableExpression<T extends Comparable> extends Compara
|
||||
* @return this < right
|
||||
* @see java.lang.Comparable#compareTo(Object)
|
||||
*/
|
||||
public final BooleanExpression lt(T right) {
|
||||
public BooleanExpression lt(T right) {
|
||||
return lt(ConstantImpl.create(right));
|
||||
}
|
||||
|
||||
@ -257,7 +257,7 @@ public abstract class ComparableExpression<T extends Comparable> extends Compara
|
||||
* @return this < right
|
||||
* @see java.lang.Comparable#compareTo(Object)
|
||||
*/
|
||||
public final BooleanExpression lt(Expression<T> right) {
|
||||
public BooleanExpression lt(Expression<T> right) {
|
||||
return Expressions.booleanOperation(Ops.LT, mixin, right);
|
||||
}
|
||||
|
||||
@ -308,7 +308,7 @@ public abstract class ComparableExpression<T extends Comparable> extends Compara
|
||||
* @return this <= right
|
||||
* @see java.lang.Comparable#compareTo(Object)
|
||||
*/
|
||||
public final BooleanExpression loe(T right) {
|
||||
public BooleanExpression loe(T right) {
|
||||
return Expressions.booleanOperation(Ops.LOE, mixin, ConstantImpl.create(right));
|
||||
}
|
||||
|
||||
@ -319,7 +319,7 @@ public abstract class ComparableExpression<T extends Comparable> extends Compara
|
||||
* @return this <= right
|
||||
* @see java.lang.Comparable#compareTo(Object)
|
||||
*/
|
||||
public final BooleanExpression loe(Expression<T> right) {
|
||||
public BooleanExpression loe(Expression<T> right) {
|
||||
return Expressions.booleanOperation(Ops.LOE, mixin, right);
|
||||
}
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ public abstract class ComparableExpressionBase<T extends Comparable> extends Sim
|
||||
*
|
||||
* @return ascending order by this
|
||||
*/
|
||||
public final OrderSpecifier<T> asc() {
|
||||
public OrderSpecifier<T> asc() {
|
||||
if (asc == null) {
|
||||
asc = new OrderSpecifier<T>(Order.ASC, mixin);
|
||||
}
|
||||
@ -57,7 +57,7 @@ public abstract class ComparableExpressionBase<T extends Comparable> extends Sim
|
||||
* @return coalesce
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public final Coalesce<T> coalesce(Expression<?>...exprs) {
|
||||
public Coalesce<T> coalesce(Expression<?>...exprs) {
|
||||
Coalesce<T> coalesce = new Coalesce<T>(getType(), mixin);
|
||||
for (Expression expr : exprs) {
|
||||
coalesce.add(expr);
|
||||
@ -71,7 +71,7 @@ public abstract class ComparableExpressionBase<T extends Comparable> extends Sim
|
||||
* @param args additional arguments
|
||||
* @return coalesce
|
||||
*/
|
||||
public final Coalesce<T> coalesce(T... args) {
|
||||
public Coalesce<T> coalesce(T... args) {
|
||||
Coalesce<T> coalesce = new Coalesce<T>(getType(), mixin);
|
||||
for (T arg : args) {
|
||||
coalesce.add(arg);
|
||||
@ -84,7 +84,7 @@ public abstract class ComparableExpressionBase<T extends Comparable> extends Sim
|
||||
*
|
||||
* @return descending order by this
|
||||
*/
|
||||
public final OrderSpecifier<T> desc() {
|
||||
public OrderSpecifier<T> desc() {
|
||||
if (desc == null) {
|
||||
desc = new OrderSpecifier<T>(Order.DESC, mixin);
|
||||
}
|
||||
|
||||
@ -318,7 +318,7 @@ public abstract class SimpleExpression<T> extends DslExpression<T> {
|
||||
* @param right rhs of the comparison
|
||||
* @return this not in right
|
||||
*/
|
||||
public final BooleanExpression notIn(CollectionExpression<?,? extends T> right) {
|
||||
public BooleanExpression notIn(CollectionExpression<?,? extends T> right) {
|
||||
return Expressions.booleanOperation(Ops.NOT_IN, mixin, right);
|
||||
}
|
||||
|
||||
@ -328,7 +328,7 @@ public abstract class SimpleExpression<T> extends DslExpression<T> {
|
||||
* @param right rhs of the comparison
|
||||
* @return this not in right
|
||||
*/
|
||||
public final BooleanExpression notIn(SubQueryExpression<? extends T> right) {
|
||||
public BooleanExpression notIn(SubQueryExpression<? extends T> right) {
|
||||
return Expressions.booleanOperation(Ops.NOT_IN, mixin, right);
|
||||
}
|
||||
|
||||
@ -338,7 +338,7 @@ public abstract class SimpleExpression<T> extends DslExpression<T> {
|
||||
* @param right rhs of the comparison
|
||||
* @return this not in right
|
||||
*/
|
||||
public final BooleanExpression notIn(Expression<? extends T>... right) {
|
||||
public BooleanExpression notIn(Expression<? extends T>... right) {
|
||||
return Expressions.booleanOperation(Ops.NOT_IN, mixin, Expressions.list(right));
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user