public final class LessThanOrEquals extends OrderedQueryExpression
LessThanOrEquals class represents a dynamic query expression
that checks whether the value of a profile attribute is less than or equal to a
specified value.
This query expression can only be used with profile attributes whose class
implements the Comparable interface.
| Constructor and Description |
|---|
LessThanOrEquals(String attrName,
Object attrValue)
Create a
LessThanOrEquals query expression. |
LessThanOrEquals(String attrName,
String attrValue,
QueryCollator collator)
Create a
LessThanOrEquals 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 LessThanOrEquals(String attrName, Object attrValue) throws NullPointerException
LessThanOrEquals query expression. A profile will match
the expression criteria if the value of the attrName attribute is
less than or equal to 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 LessThanOrEquals(String attrName, String attrValue, QueryCollator collator) throws NullPointerException
LessThanOrEquals query expression. A profile will match
the expression criteria if the value of the attrName attribute is
less than or equal to 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