org.eclipse.ecf.presence.search
Interface ICriteria


public interface ICriteria

Criteria helps for retrieving results from the provider search by composing Criterion objects. The IUserSearchManager is a factory for Criteria. Criterion instances are obtained via ISelection methods. Criteria can deal with different kind of criterion, as logical or just simple expression. The typical usage of the Criteria is as follows:

      ISelection selection = ...
                ICriterion name = selection.eq("name", "value");
                ICriterion host = selection.eq("host", "value");
                ICriterion and = selection.and(name, host);
                ICriteria criteria = ...
                criteria.add(and);
 

Since:
2.0

Method Summary
 void add(ICriterion criterion)
          Add a criterion that composes the criteria
 java.util.List getCriterions()
          A list of all criterion added to the criteria
 boolean isEmpty()
          Notify if there is or not criterion added for this criteria
 

Method Detail

add

void add(ICriterion criterion)
Add a criterion that composes the criteria

Parameters:
criterion - Will not be null

getCriterions

java.util.List getCriterions()
A list of all criterion added to the criteria

Returns:
List of ICriterion Will not be null

isEmpty

boolean isEmpty()
Notify if there is or not criterion added for this criteria

Returns:
indicate if there are or not criterion