|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.slee.profile.query.QueryExpression
javax.slee.profile.query.RangeMatch
public final class RangeMatch
The RangeMatch class represents a dynamic query expression that checks
whether the value of a profile attribute lies within a specified range. A profile
matches the expression if the profile attribute value is greater than or equal to
the lower bound value and less than or equal to the upper bound value.
This query expression can only be used with profile attributes whose class
implements the Comparable interface.
| Constructor Summary | |
|---|---|
RangeMatch(java.lang.String attrName,
java.lang.Object fromValue,
java.lang.Object toValue)
Create a RangeMatch query expression. |
|
RangeMatch(java.lang.String attrName,
java.lang.String fromValue,
java.lang.String toValue,
QueryCollator collator)
Create a RangeMatch query expression. |
|
| Method Summary | |
|---|---|
java.lang.String |
getAttributeName()
Get the name of the profile attribute used by this query expression. |
QueryCollator |
getCollator()
Get the query collator used by this query expression. |
java.lang.Object |
getFromValue()
Get the lower-bound value the profile attribute will be compared to. |
java.lang.Object |
getToValue()
Get the upper-bound value the profile attribute will be compared to. |
protected void |
toString(java.lang.StringBuffer buf)
Get a string representation for this query expression. |
| 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 |
|---|
public RangeMatch(java.lang.String attrName,
java.lang.Object fromValue,
java.lang.Object toValue)
RangeMatch query expression. A profile will match the
expression criteria if the value of the attrName attribute is
greater than or equal to fromValue and less than or equal to
toValue, as determined by Comparable.compareTo(Object).
attrName - the name of the profile attribute to compare.fromValue - the lower bound of the range.toValue - the upper bound of the range.
java.lang.NullPointerException - if any argument is null.
java.lang.IllegalArgumentException - if the class of fromValue or
toValue does not implement the java.lang.Comparable
interface.
public RangeMatch(java.lang.String attrName,
java.lang.String fromValue,
java.lang.String toValue,
QueryCollator collator)
RangeMatch query expression. A profile will match the
expression criteria if the value of the attrName attribute is
greater than or equal to fromValue and less than or equal to
toValue, 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.fromValue - the lower bound of the range.toValue - the upper bound of the range.collator - the collator to use for the comparison. May be null.
java.lang.NullPointerException - if attrName, fromValue,
or toValue is null.
java.lang.IllegalArgumentException - if the class of fromValue or
toValue does not implement the java.lang.Comparable
interface.| Method Detail |
|---|
public java.lang.String getAttributeName()
public java.lang.Object getFromValue()
public java.lang.Object getToValue()
public QueryCollator getCollator()
null if one has not been
specified for this query expression.protected void toString(java.lang.StringBuffer buf)
QueryExpression
toString in class QueryExpressionbuf - a string buffer the string representation should be appended to.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||