#2877 - Query Beans: Add lt, le, gt, ge <other property> e.g. whenRegistered.gt(QCustomer.Alias.whenActivated)

This commit is contained in:
Rob Bygrave
2022-11-02 16:32:49 +13:00
parent f6b87ed0b4
commit 600aa10453
3 changed files with 58 additions and 0 deletions
@@ -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.
*