org.eclipse.ecf.presence.search
Class Restriction

java.lang.Object
  extended by org.eclipse.ecf.presence.search.Restriction
All Implemented Interfaces:
IRestriction

public class Restriction
extends java.lang.Object
implements IRestriction

This Class implements IRestriction. Subclasses may be created as appropriate. It is just a simple implementation that can be considered for some provider or even used as base for some implementation.

Since:
2.0

Field Summary
static java.lang.String OPERATOR_AND
          Operator AND
static java.lang.String OPERATOR_EQ
          Operator Equal
static java.lang.String OPERATOR_NE
          Operator Not Equal
 
Constructor Summary
Restriction()
           
 
Method Summary
 ICriterion and(ICriterion left, ICriterion right)
          Apply an "add" constraint to the two criterion
 ICriterion eq(java.lang.String field, java.lang.String value)
          Apply an "equal" constraint to the field, ignoring case
 ICriterion eq(java.lang.String field, java.lang.String value, boolean ignoreCase)
          Apply an "equal" constraint to the field, taking into consideration ignore case
 ICriterion ne(java.lang.String field, java.lang.String value)
          Apply an "not equal" constraint to the field ignoring case
 ICriterion ne(java.lang.String field, java.lang.String value, boolean ignoreCase)
          Apply an "not equal" constraint to the field, taking into consideration ignore case
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPERATOR_EQ

public static final java.lang.String OPERATOR_EQ
Operator Equal

See Also:
Constant Field Values

OPERATOR_NE

public static final java.lang.String OPERATOR_NE
Operator Not Equal

See Also:
Constant Field Values

OPERATOR_AND

public static final java.lang.String OPERATOR_AND
Operator AND

See Also:
Constant Field Values
Constructor Detail

Restriction

public Restriction()
Method Detail

and

public ICriterion and(ICriterion left,
                      ICriterion right)
Description copied from interface: IRestriction
Apply an "add" constraint to the two criterion

Specified by:
and in interface IRestriction
Parameters:
left - Will not be null
right - Will not be null
Returns:
ICriterion

eq

public ICriterion eq(java.lang.String field,
                     java.lang.String value)
Description copied from interface: IRestriction
Apply an "equal" constraint to the field, ignoring case

Specified by:
eq in interface IRestriction
Parameters:
field - Will not be null
value - May be null
Returns:
ICriterion

ne

public ICriterion ne(java.lang.String field,
                     java.lang.String value)
Description copied from interface: IRestriction
Apply an "not equal" constraint to the field ignoring case

Specified by:
ne in interface IRestriction
Parameters:
field - Will not be null
value - May be null
Returns:
ICriterion

eq

public ICriterion eq(java.lang.String field,
                     java.lang.String value,
                     boolean ignoreCase)
Description copied from interface: IRestriction
Apply an "equal" constraint to the field, taking into consideration ignore case

Specified by:
eq in interface IRestriction
Parameters:
field - Will not be null
value - May be null
Returns:
ICriterion

ne

public ICriterion ne(java.lang.String field,
                     java.lang.String value,
                     boolean ignoreCase)
Description copied from interface: IRestriction
Apply an "not equal" constraint to the field, taking into consideration ignore case

Specified by:
ne in interface IRestriction
Parameters:
field - Will not be null
value - May be null
Returns:
ICriterion