
javax.slee.profile.query.GreaterThan Maven / Gradle / Ivy
package javax.slee.profile.query;
/**
* The 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 {@link Comparable} interface.
*/
public final class GreaterThan extends OrderedQueryExpression {
/**
* Create a GreaterThan
query expression. A profile will match
* the expression criteria if the value of the attrName
attribute
* is greater than attrValue
, as determined by {@link Comparable#compareTo(Object)}
* @param attrName the name of the profile attribute to compare.
* @param attrValue the value of the attribute to compare with.
* @throws NullPointerException if either argument is null
.
* @throws IllegalArgumentException if the class of attrValue
does
* not implement the java.lang.Comparable
interface.
*/
public GreaterThan(String attrName, Object attrValue) throws NullPointerException {
super(attrName, attrValue, null);
}
/**
* Create a GreaterThan
query expression. A profile will match the
* expression criteria if the value of the attrName
attribute
* is greater than attrValue
, as determined by {@link java.text.Collator#compare(String, String)},
* where the collator is obtained from the specified QueryCollator
.
* @param attrName the name of the profile attribute to compare.
* @param attrValue the value of the attribute to compare with.
* @param collator the collator to use for the comparison. May be null
.
* @throws NullPointerException if either attrName
or
* attrValue
is null
.
*/
public GreaterThan(String attrName, String attrValue, QueryCollator collator) throws NullPointerException {
super(attrName, attrValue, collator);
}
// protected
// javadoc copied from parent
protected String getRelation() {
return ">";
}
}