javax.slee.profile.query
Class SimpleQueryExpression

java.lang.Object
  extended by javax.slee.profile.query.QueryExpression
      extended by javax.slee.profile.query.SimpleQueryExpression
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Equals, HasPrefix, LongestPrefixMatch, NotEquals, OrderedQueryExpression

public abstract class SimpleQueryExpression
extends QueryExpression

The SimpleQueryExpression class is the base class for all dynamic query expressions that perform binary operator comparisons on profile attribute values.

See Also:
Serialized Form

Constructor Summary
protected SimpleQueryExpression(java.lang.String attrName, java.lang.Object attrValue, QueryCollator collator)
          Create a SimpleQueryExpression for the attribute with the specified name.
 
Method Summary
 java.lang.String getAttributeName()
          Get the name of the profile attribute used by this query expression.
 java.lang.Object getAttributeValue()
          Get the value the profile attribute will be compared to.
 QueryCollator getCollator()
          Get the query collator used by this query expression.
protected abstract  java.lang.String getRelation()
          Get the symbol or other name for this expression relation to be used in the toString output.
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

SimpleQueryExpression

protected SimpleQueryExpression(java.lang.String attrName,
                                java.lang.Object attrValue,
                                QueryCollator collator)
Create a SimpleQueryExpression for the attribute with the specified name. An optional query collator may also be specified if the type of the attribute being compared is java.lang.String.

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 expression, or null if no collator is specified.
Throws:
java.lang.NullPointerException - if either attrName or attrValue is null.
Method Detail

getAttributeName

public final java.lang.String getAttributeName()
Get the name of the profile attribute used by this query expression.

Returns:
the name of the profile attribute.

getAttributeValue

public final java.lang.Object getAttributeValue()
Get the value the profile attribute will be compared to.

Returns:
the value the profile attribute will be compared to.

getCollator

public final QueryCollator getCollator()
Get the query collator used by this query expression.

Returns:
the query collator, or null if one has not been specified for this query expression.

toString

protected final void toString(java.lang.StringBuffer buf)
Description copied from class: QueryExpression
Get a string representation for this query expression.

Specified by:
toString in class QueryExpression
Parameters:
buf - a string buffer the string representation should be appended to.

getRelation

protected abstract java.lang.String getRelation()
Get the symbol or other name for this expression relation to be used in the toString output.

Returns:
the symbol or other name for this expression relation.


Copyright © 2009. All Rights Reserved.