public final class LessThan extends OrderedQueryExpression
GreaterThan class represents a dynamic query expression that
checks whether the value of a profile attribute is greater than a specified value.
This query expression can only be used with profile attributes whose class
implements the Comparable interface.
| Constructor and Description |
|---|
LessThan(String attrName,
Object attrValue)
Create a
LessThan query expression. |
LessThan(String attrName,
String attrValue,
QueryCollator collator)
Create a
LessThan query expression. |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getRelation()
Get the symbol or other name for this expression relation to be used in the
toString output. |
getAttributeName, getAttributeValue, getCollator, toStringtoStringpublic LessThan(String attrName, Object attrValue) throws NullPointerException
LessThan query expression. A profile will match the
expression criteria if the value of the attrName attribute
is less than attrValue, as determined by Comparable.compareTo(Object).attrName - the name of the profile attribute to compare.attrValue - the value of the attribute to compare with.NullPointerException - if either argument is null.IllegalArgumentException - if the class of attrValue does
not implement the java.lang.Comparable interface.public LessThan(String attrName, String attrValue, QueryCollator collator) throws NullPointerException
LessThan query expression. A profile will match the
expression criteria if the value of the attrName attribute
is less than attrValue, as determined by Collator.compare(String, String),
where the collator is obtained from the specified QueryCollator.attrName - the name of the profile attribute to compare.attrValue - the value of the attribute to compare with.collator - the collator to use for the comparison. May be null.NullPointerException - if either attrName or
attrValue is null.protected String getRelation()
SimpleQueryExpressiontoString output.getRelation in class SimpleQueryExpression