com.ibm.workplace.wcm.api.editions.query
Class EditionSelectors

java.lang.Object
  extended by com.ibm.workplace.wcm.api.editions.query.EditionSelectors

public class EditionSelectors
extends java.lang.Object

EditionSelectors is a factory class to create Selectors. Here is an example of how to use Selectors:

  EditionService editionService;
  EditionQuery query = editionService.createQuery();
  query.addSelector(EditionSelectors.nameLike("apple_%"));
  query.addSelector(EditionSelectors.createdSince(Calendar.getInstance());
 

Since:
8.5

Nested Class Summary
protected static interface EditionSelectors.Factory
          Factory interface, used for internal implementation
 
Field Summary
static java.lang.String BUNDLE_NAME
          Bundle name
static java.lang.String ERROR_PARAM_VALUE_MUST_NOT_BE_NULL
          must not be null ERROR_PARAM_VALUE_MUST_NOT_BE_NULL
static java.lang.String ERROR_PARAM_VALUE_MUST_NOT_BE_NULL_1
          param must not be null ERROR_PARAM_VALUE_MUST_NOT_BE_NULL_1
 
Constructor Summary
EditionSelectors()
           
 
Method Summary
static EditionSelector createdBefore(java.util.Date createdDate)
          Returns a selector matching editons created before the specified date.
static EditionSelector createdSince(java.util.Date createdDate)
          Returns a selector matching editions created since the specified date.
static EditionSelector idEquals(Identity<Edition> id)
          Returns a selector representing id 'equals'.
static EditionSelector nameEquals(java.lang.String name)
          Returns a selector representing name 'equals'
static EditionSelector nameIn(java.util.Collection<java.lang.String> names)
          Returns a selector which matches on any supplied name
static EditionSelector nameIn(java.lang.String... names)
          Returns a selector which matches on any supplied name
static EditionSelector nameLike(java.lang.String name)
          Returns a selector representing name 'like'.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUNDLE_NAME

public static final java.lang.String BUNDLE_NAME
Bundle name

See Also:
Constant Field Values

ERROR_PARAM_VALUE_MUST_NOT_BE_NULL_1

public static final java.lang.String ERROR_PARAM_VALUE_MUST_NOT_BE_NULL_1
param must not be null ERROR_PARAM_VALUE_MUST_NOT_BE_NULL_1

See Also:
Constant Field Values

ERROR_PARAM_VALUE_MUST_NOT_BE_NULL

public static final java.lang.String ERROR_PARAM_VALUE_MUST_NOT_BE_NULL
must not be null ERROR_PARAM_VALUE_MUST_NOT_BE_NULL

See Also:
Constant Field Values
Constructor Detail

EditionSelectors

public EditionSelectors()
Method Detail

idEquals

public static EditionSelector idEquals(Identity<Edition> id)
Returns a selector representing id 'equals'.

Parameters:
id - Identity
Returns:
id 'equals' selector

nameEquals

public static EditionSelector nameEquals(java.lang.String name)
Returns a selector representing name 'equals'

Parameters:
name - query name
Returns:
name 'equals' selector

nameLike

public static EditionSelector nameLike(java.lang.String name)
Returns a selector representing name 'like'. The syntax of the query string is like SQL. % allows you to match any string of any length.

Parameters:
name - query name
Returns:
name 'like' selector

nameIn

public static EditionSelector nameIn(java.lang.String... names)
Returns a selector which matches on any supplied name

Parameters:
names - a list of names to match
Returns:
name 'in' selector

nameIn

public static EditionSelector nameIn(java.util.Collection<java.lang.String> names)
Returns a selector which matches on any supplied name

Parameters:
names - a list of names to match
Returns:
name 'in' selector

createdBefore

public static EditionSelector createdBefore(java.util.Date createdDate)
Returns a selector matching editons created before the specified date. The comparison is exclusive, i.e. the selector will not match editions with the exact same creation date.

Parameters:
createdDate - created date
Returns:
created date 'before' selector

createdSince

public static EditionSelector createdSince(java.util.Date createdDate)
Returns a selector matching editions created since the specified date. The comparison is inclusive, i.e. the selector will match editions with the exact same creation date.

Parameters:
createdDate - created date
Returns:
created date 'since' selector