Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.ibm.workplace.wcm.api.query
Class Selectors

    java.lang.Object
      com.ibm.workplace.wcm.api.query.Selectors

    public final class Selectors

extends java.lang.Object

`Selectors` is a factory class to create basic `Selector`s. See also `HistorySelectors`, `ProfileSelector`, `ProjectStateSelectors` and `WorkflowSelectors` for more `Selector`s related to these objects. Here is an example of how to use `Selectors`:

      QueryService queryService = workspace.getQueryService();
      Query query = queryService.createQuery();
      query.addSelector(Selectors.nameLike("apple_%"));
      query.addSelector(Selectors.typeEquals(DocumentTypes.Content));

Since:
  7.0

Nested Class Summary
`protected static interface` | `Selectors.Factory` Factory interface, used for internal implementation

Constructor Summary
`Selectors()`

Method Summary
`static Selector` | `authoringTemplateEquals(AuthoringTemplate authoringTemplate)` Deprecated. Use authoringTemplateEquals(Identity)
`static Selector` | `authoringTemplateEquals(Identity template)` Returns a selector which matches items with the given authoring template.
`static Selector` | `authoringTemplateIn(AuthoringTemplate... authoringTemplates)` Deprecated. Use authoringTemplateIn(Identity...)
`static Selector` | `authoringTemplateIn(java.util.Collection<? extends AuthoringTemplate> authoringTemplates)` Deprecated. Use authoringTemplateInId(Collection)
`static Selector` | `authoringTemplateIn(Identity... templates)` Returns a selector which matches items whose authoring template is in the given array of authoring templates.
`static Selector` | `authoringTemplateInId(java.util.Collection<? extends Identity> templates)` Returns a selector which matches items whose authoring template is in the given list of authoring templates.
`static Selector` | `authorsContain(java.util.Collection<java.lang.String> authors)` Returns a selector which matches items whose list of authors contains each specified author
`static Selector` | `authorsContain(java.lang.String... authors)` Returns a selector which matches items whose list of authors contains each specified author
`static Selector` | `authorsContain(java.lang.String author)` Returns a selector which matches items whose list of authors contains the specified author
`static Selector` | `creatorEquals(java.lang.String creator)` Returns a selector which matches items with the specified creator
`static Selector` | `creatorIn(java.util.Collection<java.lang.String> creators)` Returns a selector which matches items with a creator from the specified collection
`static Selector` | `creatorIn(java.lang.String... creators)` Returns a selector which matches items with a creator from the specified collection
`static Selector` | `idEquals(Identity id)` Returns a selector representing id 'equals'.
`static Selector` | `idIn(java.util.Collection<? extends Identity> ids)` Returns a selector representing id 'in'.
`static Selector` | `idIn(Identity... ids)` Returns a selector representing id 'in'.
`static Selector` | `isProjectDraft()`
`protected static java.util.List<Identity>` | `itemsToIdentities(Item... items)` Convenience method to get convert an array of Items to their Identity objects.
`static Selector` | `libraryEquals(Library library)` Returns a selector representing library 'equals'
`static Selector` | `libraryIn(java.util.Collection<? extends Library> libraries)` Returns a selector representing library 'in'
`static Selector` | `libraryIn(Library... libraries)` Returns a selector representing library 'in'
`static Selector` | `nameEquals(java.lang.String name)` Returns a selector representing name 'equals'
`static Selector` | `nameIn(java.util.Collection<java.lang.String> names)` Returns a selector which matches on any supplied name
`static Selector` | `nameIn(java.lang.String... names)` Returns a selector which matches on any supplied name
`static Selector` | `nameLike(java.lang.String name)` Returns a selector representing name 'like'.
`static Selector` | `ownersContain(java.util.Collection<java.lang.String> owners)` Returns a selector which matches items whose list of owners contains each specified owner
`static Selector` | `ownersContain(java.lang.String... owners)` Returns a selector which matches items whose list of owners contains each specified owner
`static Selector` | `ownersContain(java.lang.String owner)` Returns a selector which matches items whose list of owners contains the specified owner
`static Selector` | `projectEquals(Identity id)` Returns a selector representing project id 'equals'.
`static Selector` | `projectIn(Identity... ids)` Returns a selector representing project id 'in'.
`static Selector` | `titleEquals(java.lang.String title)` Returns a selector representing 'title equals'.
`static Selector` | `titleIn(java.util.Collection<java.lang.String> titles)` Returns a selector representing title 'in'.
`static Selector` | `titleIn(java.lang.String... titles)` Returns a selector representing title 'in'.
`static Selector` | `titleLike(java.lang.String title)` Returns a selector representing 'title like' The syntax of the query string is like SQL.
`static Selector` | `typeEquals(java.lang.Class<? extends Item> type)` Returns a selector representing type 'equals'
`static Selector` | `typeIn(java.lang.Class<? extends Item>... types)` Returns a selector representing type 'in'
`static Selector` | `typeIn(java.util.Collection<java.lang.Class<? extends Item>> types)` Returns a selector representing type 'in'

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Selectors

    public Selectors()

Method Detail

### typeEquals

    public static Selector typeEquals(java.lang.Class<? extends Item> type)

  Returns a selector representing type 'equals'

  Parameters:
    `type` - query type
  Returns:
    type 'equals' selector

### typeIn

    public static Selector typeIn(java.lang.Class<? extends Item>... types)

  Returns a selector representing type 'in'

  Parameters:
    `types` - query types
  Returns:
    type 'in' selector

### typeIn

    public static Selector typeIn(java.util.Collection<java.lang.Class<? extends Item>> types)

  Returns a selector representing type 'in'

  Parameters:
    `types` - query types
  Returns:
    type 'in' selector

### idEquals

    public static Selector idEquals(Identity id)

  Returns a selector representing id 'equals'.

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

### idIn

    public static Selector idIn(Identity... ids)

  Returns a selector representing id 'in'. Each of the query result will at least match one of the given id.

  Parameters:
    `ids` - Identity list
  Returns:
    id 'in' selector

### idIn

    public static Selector idIn(java.util.Collection<? extends Identity> ids)

  Returns a selector representing id 'in'. Each of the query result will at least match one of the given id.

  Parameters:
    `ids` - Identity list
  Returns:
    id 'in' selector

### nameEquals

    public static Selector nameEquals(java.lang.String name)

  Returns a selector representing name 'equals'

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

### nameLike

    public static Selector 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. _ allows you to match a single character.

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

### nameIn

    public static Selector 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 Selector 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

### projectEquals

    public static Selector projectEquals(Identity id)

  Returns a selector representing project id 'equals'.

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

### projectIn

    public static Selector projectIn(Identity... ids)

  Returns a selector representing project id 'in'. Each of the query result will at least match one of the given id.

  Parameters:
    `ids` - Identity list
  Returns:
    id 'in' selector

### titleEquals

    public static Selector titleEquals(java.lang.String title)

  Returns a selector representing 'title equals'.

  Parameters:
    `title` - title
  Returns:
    title 'equals' selector

### titleLike

    public static Selector titleLike(java.lang.String title)

  Returns a selector representing 'title like' The syntax of the query string is like SQL. % allows you to match any string of any length. _ allows you to match a single character.

  Parameters:
    `title` - title
  Returns:
    title 'like' selector

### titleIn

    public static Selector titleIn(java.lang.String... titles)

  Returns a selector representing title 'in'. The title property matched the title list will show up in the result list.

  Parameters:
    `titles` - title list
  Returns:
    title 'in' selector

### titleIn

    public static Selector titleIn(java.util.Collection<java.lang.String> titles)

  Returns a selector representing title 'in'. The title property matched the title list will show up in the result list.

  Parameters:
    `titles` - title list
  Returns:
    title 'in' selector

### libraryEquals

    public static Selector libraryEquals(Library library)

  Returns a selector representing library 'equals'

  Parameters:
    `library` - the library
  Returns:
    library 'equals' selector

### libraryIn

    public static Selector libraryIn(Library... libraries)

  Returns a selector representing library 'in'

  Parameters:
    `libraries` - a variable length of library id
  Returns:
    library 'in' selector

### libraryIn

    public static Selector libraryIn(java.util.Collection<? extends Library> libraries)

  Returns a selector representing library 'in'

  Parameters:
    `libraries` - a set of library id
  Returns:
    library 'in' selector

### authoringTemplateEquals

    public static Selector authoringTemplateEquals(AuthoringTemplate authoringTemplate)

  Deprecated. Use authoringTemplateEquals(Identity)

  Returns a selector matching items whose `AuthoringTemplate` is equal to the `AuthoringTemplate` provided.

  Parameters:
    `authoringTemplate` - an `AuthoringTemplate`
  Returns:
    authoring template 'equals' selector

### authoringTemplateIn

    public static Selector authoringTemplateIn(AuthoringTemplate... authoringTemplates)

  Deprecated. Use authoringTemplateIn(Identity...)

  Returns a selector matching items with an `AuthoringTemplate` in the `AuthoringTemplate`s provided.

  Parameters:
    `authoringTemplates` - any number of `AuthoringTemplate`s
  Returns:
    authoring template 'in' selector

### authoringTemplateIn

    public static Selector authoringTemplateIn(java.util.Collection<? extends AuthoringTemplate> authoringTemplates)

  Deprecated. Use authoringTemplateInId(Collection)

  Returns a selector matching items with an `AuthoringTemplate` in the `Collection` provided.

  Parameters:
    `authoringTemplates` - a `Collection` of `AuthoringTemplate`
  Returns:
    authoring template 'in' selector

### authoringTemplateEquals

    public static Selector authoringTemplateEquals(Identity template)

  Returns a selector which matches items with the given authoring template.

  Parameters:
    `template` - template to match
  Returns:
    templates 'equals' selector
  Since:
    8.0

### authoringTemplateIn

    public static Selector authoringTemplateIn(Identity... templates)

  Returns a selector which matches items whose authoring template is in the given array of authoring templates.

  Parameters:
    `templates` - array of templates to match
  Returns:
    templates 'in' selector
  Since:
    8.0

### authoringTemplateInId

    public static Selector authoringTemplateInId(java.util.Collection<? extends Identity> templates)

  Returns a selector which matches items whose authoring template is in the given list of authoring templates.

  Parameters:
    `templates` - list of templates to match
  Returns:
    templates 'in' selector
  Since:
    8.0

### creatorEquals

    public static Selector creatorEquals(java.lang.String creator)

  Returns a selector which matches items with the specified creator

  Parameters:
    `creator` - the creator DN to match
  Returns:
    creator 'equals' selector

### creatorIn

    public static Selector creatorIn(java.lang.String... creators)

  Returns a selector which matches items with a creator from the specified collection

  Parameters:
    `creators` - the list of creator DNs to match
  Returns:
    creator 'in' selector

### creatorIn

    public static Selector creatorIn(java.util.Collection<java.lang.String> creators)

  Returns a selector which matches items with a creator from the specified collection

  Parameters:
    `creators` - the collection of creator DNs to match
  Returns:
    creator 'in' selector

### authorsContain

    public static Selector authorsContain(java.lang.String author)

  Returns a selector which matches items whose list of authors contains the specified author

  Parameters:
    `author` - the author DN to match
  Returns:
    authors 'contain' selector

### authorsContain

    public static Selector authorsContain(java.lang.String... authors)

  Returns a selector which matches items whose list of authors contains each specified author

  Parameters:
    `authors` - list of author DNs to match
  Returns:
    authors 'contain' selector

### authorsContain

    public static Selector authorsContain(java.util.Collection<java.lang.String> authors)

  Returns a selector which matches items whose list of authors contains each specified author

  Parameters:
    `authors` - list of author DNs to match
  Returns:
    authors 'contain' selector

### ownersContain

    public static Selector ownersContain(java.lang.String owner)

  Returns a selector which matches items whose list of owners contains the specified owner

  Parameters:
    `owner` - the owner DN to match
  Returns:
    authors 'contain' selector

### ownersContain

    public static Selector ownersContain(java.lang.String... owners)

  Returns a selector which matches items whose list of owners contains each specified owner

  Parameters:
    `owners` - list of owner DNs to match
  Returns:
    authors 'contain' selector

### ownersContain

    public static Selector ownersContain(java.util.Collection<java.lang.String> owners)

  Returns a selector which matches items whose list of owners contains each specified owner

  Parameters:
    `owners` - list of owner DNs to match
  Returns:
    authors 'contain' selector

### itemsToIdentities

    protected static java.util.List<Identity> itemsToIdentities(Item... items)

  Convenience method to get convert an array of Items to their Identity objects.

  Parameters:
    `items` - The items
  Returns:
    The Identity objects

### isProjectDraft

    public static Selector isProjectDraft()

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD