
javax.slee.profile.query.OrderedQueryExpression Maven / Gradle / Ivy
The newest version!
package javax.slee.profile.query;
/**
* The OrderedQueryExpression
class is the base class for all dynamic
* query expressions that perform direct binary operator comparisons on profile
* attributes values where the type of the profile attribute type exhibits a notion
* of total order.
*/
public abstract class OrderedQueryExpression extends SimpleQueryExpression {
/**
* Create an OrderedQueryExpression
for the attribute with the
* specified name and value. An optional query collator may also be specified
* if the type of the attribute being compared is java.lang.String
.
* @param attrName the name of the profile attribute.
* @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
.
* @throws IllegalArgumentException if the class of attrValue
does
* not implement the java.lang.Comparable
interface.
*/
protected OrderedQueryExpression(String attrName, Object attrValue, QueryCollator collator) throws NullPointerException {
super(attrName, attrValue, collator);
if (!(attrValue instanceof Comparable))
throw new IllegalArgumentException("Attribute value class " + attrValue.getClass().getName()
+ " does not implement the java.lang.Comparable interface");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy