javax.slee.profile.query
Class GreaterThan

java.lang.Object
  extended by javax.slee.profile.query.QueryExpression
      extended by javax.slee.profile.query.SimpleQueryExpression
          extended by javax.slee.profile.query.OrderedQueryExpression
              extended by javax.slee.profile.query.GreaterThan
All Implemented Interfaces:
java.io.Serializable

public final class GreaterThan
extends OrderedQueryExpression

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 Comparable interface.

See Also:
Serialized Form

Constructor Summary
GreaterThan(java.lang.String attrName, java.lang.Object attrValue)
          Create a GreaterThan query expression.
GreaterThan(java.lang.String attrName, java.lang.String attrValue, QueryCollator collator)
          Create a GreaterThan query expression.
 
Method Summary
protected  java.lang.String getRelation()
          Get the symbol or other name for this expression relation to be used in the toString output.
 
Methods inherited from class javax.slee.profile.query.SimpleQueryExpression
getAttributeName, getAttributeValue, getCollator, toString
 
Methods inherited from class javax.slee.profile.query.QueryExpression
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GreaterThan

public GreaterThan(java.lang.String attrName,
                   java.lang.Object attrValue)
            throws java.lang.NullPointerException
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 Comparable.compareTo(Object)

Parameters:
attrName - the name of the profile attribute to compare.
attrValue - the value of the attribute to compare with.
Throws:
java.lang.NullPointerException - if either argument is null.
java.lang.IllegalArgumentException - if the class of attrValue does not implement the java.lang.Comparable interface.

GreaterThan

public GreaterThan(java.lang.String attrName,
                   java.lang.String attrValue,
                   QueryCollator collator)
            throws java.lang.NullPointerException
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 Collator.compare(String, String), where the collator is obtained from the specified QueryCollator.

Parameters:
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.
Throws:
java.lang.NullPointerException - if either attrName or attrValue is null.
Method Detail

getRelation

protected java.lang.String getRelation()
Description copied from class: SimpleQueryExpression
Get the symbol or other name for this expression relation to be used in the toString output.

Specified by:
getRelation in class SimpleQueryExpression
Returns:
the symbol or other name for this expression relation.


Copyright © 2008. All Rights Reserved.