com.ibm.workplace.wcm.api.query
Class Association

java.lang.Object
  extended by com.ibm.workplace.wcm.api.query.CompoundSelector
      extended by com.ibm.workplace.wcm.api.query.Association
All Implemented Interfaces:
QueryElement, Selector, java.io.Serializable
Direct Known Subclasses:
Conjunction, Disjunction

public abstract class Association
extends CompoundSelector

Associations are Selectors which associate other Selectors with an Operation Example use of Associations Conjunction and Disjunction

  Query query = queryService.createQuery(Content.class);
  Disjunction or = new Disjunction();
  or.add(Selectors.nameLike("news%"));
  Conjunction and = new Conjunction();
  and.add(Selectors.nameLike("article%"));
  and.add(ProfileSelectors.keywordsContain("news"));
  or.add(and);
  query.addSelector(or);
 

Since:
7.0
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.ibm.workplace.wcm.api.query.Selector
NULL_SELECTOR
 
Constructor Summary
protected Association()
          Constructor for jax-b
  Association(java.util.Collection<Selector> conditions, Operator operator)
          Constructor
  Association(Operator operator)
          Constructor
 
Method Summary
 void add(java.util.Collection<Selector> selectors)
          Adds selectors
 void add(Selector... selectors)
          Adds a list of selectors
 void add(Selector selector)
          Adds a selector
 Association createAssociation(Operator operator)
          Create a association
 Operator getOperator()
          Gets the operator
 java.util.List<Selector> getSelectors()
           
 java.lang.String toString()
           
 
Methods inherited from class com.ibm.workplace.wcm.api.query.CompoundSelector
getElements, hasElements
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Association

protected Association()
Constructor for jax-b


Association

public Association(Operator operator)
Constructor

Parameters:
operator -

Association

public Association(java.util.Collection<Selector> conditions,
                   Operator operator)
Constructor

Parameters:
conditions -
operator -
Method Detail

add

public void add(Selector selector)
Adds a selector

Parameters:
selector - the selector to add

add

public void add(Selector... selectors)
Adds a list of selectors

Parameters:
selectors - the selectors to add

add

public void add(java.util.Collection<Selector> selectors)
Adds selectors

Parameters:
selectors - the selectors to add

getSelectors

public java.util.List<Selector> getSelectors()
Specified by:
getSelectors in class CompoundSelector
Returns:
the selectors in this association

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
a string identifying the type of this association

getOperator

public Operator getOperator()
Gets the operator

Returns:
operator

createAssociation

public Association createAssociation(Operator operator)
Create a association

Parameters:
operator -
Returns:
a new association