mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#2877 - Query Beans: Add lt, le, gt, ge <other property> e.g. whenRegistered.gt(QCustomer.Alias.whenActivated)
This commit is contained in:
@@ -40,6 +40,17 @@ public class PBaseCompareable<R, T> extends PBaseValueEqual<R, T> {
|
||||
return _root;
|
||||
}
|
||||
|
||||
/**
|
||||
* Greater than other property.
|
||||
*
|
||||
* @param other the other property to compare
|
||||
* @return the root query bean instance
|
||||
*/
|
||||
public final R gt(TQProperty<?> other) {
|
||||
expr().raw(_name + " > " + other.propertyName());
|
||||
return _root;
|
||||
}
|
||||
|
||||
/**
|
||||
* Greater than OR Null.
|
||||
*
|
||||
@@ -62,6 +73,17 @@ public class PBaseCompareable<R, T> extends PBaseValueEqual<R, T> {
|
||||
return _root;
|
||||
}
|
||||
|
||||
/**
|
||||
* Greater than or Equal to other property.
|
||||
*
|
||||
* @param other the other property to compare
|
||||
* @return the root query bean instance
|
||||
*/
|
||||
public final R ge(TQProperty<?> other) {
|
||||
expr().raw(_name + " >= " + other.propertyName());
|
||||
return _root;
|
||||
}
|
||||
|
||||
/**
|
||||
* Greater than or Equal to OR Null.
|
||||
*
|
||||
@@ -84,6 +106,17 @@ public class PBaseCompareable<R, T> extends PBaseValueEqual<R, T> {
|
||||
return _root;
|
||||
}
|
||||
|
||||
/**
|
||||
* Less than other property.
|
||||
*
|
||||
* @param other the other property to compare
|
||||
* @return the root query bean instance
|
||||
*/
|
||||
public final R lt(TQProperty<?> other) {
|
||||
expr().raw(_name + " < " + other.propertyName());
|
||||
return _root;
|
||||
}
|
||||
|
||||
/**
|
||||
* Less than OR Null.
|
||||
*
|
||||
@@ -106,6 +139,17 @@ public class PBaseCompareable<R, T> extends PBaseValueEqual<R, T> {
|
||||
return _root;
|
||||
}
|
||||
|
||||
/**
|
||||
* Less than or Equal to other property.
|
||||
*
|
||||
* @param other the other property to compare
|
||||
* @return the root query bean instance
|
||||
*/
|
||||
public final R le(TQProperty<?> other) {
|
||||
expr().raw(_name + " <= " + other.propertyName());
|
||||
return _root;
|
||||
}
|
||||
|
||||
/**
|
||||
* Less than or Equal to.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user