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 Sorts

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

    public class Sorts

extends java.lang.Object

This class contains several static methods for helping creating `Sort` object. Here is an example of how to use `Sorts`:

      Query query = queryService.createQuery(DocumentTypes.Content);
      query.addSelector(Selectors.nameLike("apple_%"));
      query.addSort(Sorts.byTitle(true));

Since:
  7.0

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

Constructor Summary
`Sorts()`

Method Summary
`static Sort` | `byAuthor(SortDirection direction)` Returns a `Sort` representing 'by author'.
`static Sort` | `byDateCreated(SortDirection direction)` Returns a `Sort` representing 'by created date'.
`static Sort` | `byDateModified(SortDirection direction)` Returns a `Sort` representing 'by modified date'.
`static Sort` | `byExpiryDate(SortDirection direction)` Returns a `Sort` representing 'by expiry date'.
`static Sort` | `byGeneralDateOne(SortDirection direction)` Returns a `Sort` representing 'by general date one'.
`static Sort` | `byGeneralDateTwo(SortDirection direction)` Returns a `Sort` representing 'by general date two'.
`static Sort` | `byId(SortDirection direction)` Returns a `Sort` representing 'by ID'.
`static Sort` | `byName(SortDirection direction)` Returns a `Sort` representing 'by name'.
`static Sort` | `byName(SortDirection direction, java.util.Locale locale)` Returns a `Sort` representing 'by name'.
`static Sort` | `byPosition(SortDirection direction)` Returns a `Sort` representing 'by position'.
`static Sort` | `byPublishDate(SortDirection direction)` Returns a `Sort` representing 'by publish date'.
`static Sort` | `byTitle(SortDirection direction)` Returns a `Sort` representing 'by title'.
`static Sort` | `byTitle(SortDirection direction, java.util.Locale locale)` Returns a `Sort` representing 'by title'.
`static Sort` | `byType(SortDirection direction)` Returns a `Sort` representing 'by type'.
`static Sort` | `byWorkflowStatus(SortDirection direction)` Returns a `Sort` representing 'by status'.
`static void` | `setFactory(Sorts.SortFactory factory)` Sets the concrete factory

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

Constructor Detail

### Sorts

    public Sorts()

Method Detail

### byAuthor

    public static Sort byAuthor(SortDirection direction)

  Returns a `Sort` representing 'by author'.

  Parameters:
    `direction` - weather ascending or descending
  Returns:
    'by author' sort

### byName

    public static Sort byName(SortDirection direction)

  Returns a `Sort` representing 'by name'.

  Note: this will sort the results based on the system default locale collation

  Parameters:
    `direction` - weather ascending or descending
  Returns:
    'by name' sort

### byName

    public static Sort byName(SortDirection direction,
                              java.util.Locale locale)

  Returns a `Sort` representing 'by name'.

  Parameters:
    `direction` - weather ascending or descending
    `locale` - to use for the sort collation. The system default will be used if null is supplied.
  Returns:
    'by name' sort
  Since:
    8.5

### byTitle

    public static Sort byTitle(SortDirection direction)

  Returns a `Sort` representing 'by title'.

  Note: this will sort the results based on the system default locale collation

  Parameters:
    `direction` - weather ascending or descending
  Returns:
    'by title' sort

### byTitle

    public static Sort byTitle(SortDirection direction,
                               java.util.Locale locale)

  Returns a `Sort` representing 'by title'.

  Parameters:
    `direction` - weather ascending or descending
    `locale` - to use for the sort collation. The system default will be used if null is supplied.
  Returns:
    'by title' sort
  Since:
    8.5

### byDateCreated

    public static Sort byDateCreated(SortDirection direction)

  Returns a `Sort` representing 'by created date'.

  Parameters:
    `direction` - weather ascending or descending
  Returns:
    'by created date' sort

### byDateModified

    public static Sort byDateModified(SortDirection direction)

  Returns a `Sort` representing 'by modified date'.

  Parameters:
    `direction` - weather ascending or descending
  Returns:
    'by modified date' sort

### byGeneralDateOne

    public static Sort byGeneralDateOne(SortDirection direction)

  Returns a `Sort` representing 'by general date one'.

  Parameters:
    `direction` - weather ascending or descending
  Returns:
    'by modified date' sort

### byGeneralDateTwo

    public static Sort byGeneralDateTwo(SortDirection direction)

  Returns a `Sort` representing 'by general date two'.

  Parameters:
    `direction` - weather ascending or descending
  Returns:
    'by modified date' sort

### byPublishDate

    public static Sort byPublishDate(SortDirection direction)

  Returns a `Sort` representing 'by publish date'.

  Parameters:
    `direction` - weather ascending or descending
  Returns:
    'by modified date' sort

### byExpiryDate

    public static Sort byExpiryDate(SortDirection direction)

  Returns a `Sort` representing 'by expiry date'.

  Parameters:
    `direction` - weather ascending or descending
  Returns:
    'by modified date' sort

### byId

    public static Sort byId(SortDirection direction)

  Returns a `Sort` representing 'by ID'.

  Parameters:
    `direction` - weather ascending or descending
  Returns:
    'by id' sort

### byPosition

    public static Sort byPosition(SortDirection direction)

  Returns a `Sort` representing 'by position'.

  Parameters:
    `direction` - weather ascending or descending
  Returns:
    'by position' sort

### byWorkflowStatus

    public static Sort byWorkflowStatus(SortDirection direction)

  Returns a `Sort` representing 'by status'.

  Parameters:
    `direction` - weather ascending or descending
  Returns:
    'by status' sort

### byType

    public static Sort byType(SortDirection direction)

  Returns a `Sort` representing 'by type'.

  Parameters:
    `direction` - weather ascending or descending
  Returns:
    'by status' sort

### setFactory

    public static void setFactory(Sorts.SortFactory factory)

  Sets the concrete factory

  Parameters:
    `factory` - concrete factory

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