public final class NotEquals extends SimpleQueryExpression
NotEquals
class represents a dynamic query expression that checks for
for inequality between a profile attribute and a specified value.Constructor and Description |
---|
NotEquals(String attrName,
Object attrValue)
Create a
NotEquals query expression. |
NotEquals(String attrName,
String attrValue,
QueryCollator collator)
Create a
NotEquals query expression. |
Modifier and Type | Method and Description |
---|---|
protected String |
getRelation()
Get the symbol or other name for this expression relation to be used in the
toString output. |
getAttributeName, getAttributeValue, getCollator, toString
toString
public NotEquals(String attrName, Object attrValue) throws NullPointerException
NotEquals
query expression. A profile will match the
expression criteria if the value of the attrName
attribute
is not equal to attrValue
, as determined by Object.equals(Object)
.attrName
- the name of the profile attribute to compare.attrValue
- the value of the attribute to compare with.NullPointerException
- if either argument is null
.public NotEquals(String attrName, String attrValue, QueryCollator collator) throws NullPointerException
NotEquals
query expression. A profile will match the
expression criteria if the value of the attrName
attribute
is not equal to attrValue
, as determined by Collator.equals(String, String)
,
where the collator is obtained from the specified QueryCollator
.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
.NullPointerException
- if either attrName
or
attrValue
is null
.protected String getRelation()
SimpleQueryExpression
toString
output.getRelation
in class SimpleQueryExpression