Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2005 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.p13n.content.expression
Class SortCriteria

    java.lang.Object
      com.bea.p13n.content.expression.SortCriteria

All Implemented Interfaces:
  Cloneable, Comparable, Serializable

public class SortCriteria
extends Object
implements Cloneable, Comparable, Serializable

A class which handles the sortBy part of a Search.

This object represents a single sort criteria, which is a property name and an ascending/descending flag. The class provides a utility method to parse a sortBy string into an array of SortCriteria.

This supports standard SQL-style sort by clauses of the form:

    <propname>[ASC|DESC], ...

where ASC|DESC is optional, defaulting to ASC; also, if propname contains a ".", it assumed to be <properyset>.<propname>. Additionally, if the property name contains non-identifier characters (e.g. whitespace, double quotes, dashes, etc.), you can use the `toProperty('propname')` or `toProperty('propertyset', 'propname')` construct.

Examples of valid sortBy clauses: ``

- size
- mimeType, size DESC
- toProperty('Preferred Color') DESC, creationDate, author, modifiedDate

See Also:
  Serialized Form

Field Summary
`boolean` | `isAscending` Deprecated. The ascending or descending order.
`String` | `propertyName` Deprecated. The property name to sort on.
`String` | `propertySet` Deprecated. The property set name.

Constructor Summary
`SortCriteria(String propertyName)` Deprecated. Constructor.
`SortCriteria(String propertyName, boolean isAscending)` Deprecated. Constructor.
`SortCriteria(String propertySet, String propertyName, boolean isAscending)` Deprecated. Constructor.

Method Summary
`Object` | `clone()` Deprecated. Clone this object.
`int` | `compareTo(Object obj)` Deprecated. Compare this object to another object.
`boolean` | `equals(Object o)` Deprecated. Determine if this object is equal to another object.
`static SortCriteria[]` | `getSortCriteria(String sortBy)` Deprecated. Parse the given sort string and return an array of SortCriteria.
`int` | `hashCode()` Deprecated. Override the hashCode because we overrid equals().
`String` | `toString()` Deprecated. Convert to a string.

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### isAscending

    public boolean isAscending

  Deprecated.
  The ascending or descending order.

### propertyName

    public String propertyName

  Deprecated.
  The property name to sort on.

### propertySet

    public String propertySet

  Deprecated.
  The property set name.

Constructor Detail

### SortCriteria

    public SortCriteria(String propertyName)

  Deprecated.
  Constructor.

### SortCriteria

    public SortCriteria(String propertyName,
                        boolean isAscending)

  Deprecated.
  Constructor.

### SortCriteria

    public SortCriteria(String propertySet,
                        String propertyName,
                        boolean isAscending)

  Deprecated.
  Constructor.

Method Detail

### clone

    public Object clone()

  Deprecated.
  Clone this object.

### compareTo

    public int compareTo(Object obj)

  Deprecated.
  Compare this object to another object.

  Specified by:
    `compareTo` in interface `Comparable`

### equals

    public boolean equals(Object o)

  Deprecated.
  Determine if this object is equal to another object.

### getSortCriteria

    public static SortCriteria[] getSortCriteria(String sortBy)
                                          throws IllegalArgumentException

  Deprecated.
  Parse the given sort string and return an array of SortCriteria.

  Parameters:
    `sortBy` - the sort string (e.g. "identifier ASC, creationDate DESC").
  Returns:
    the array of SortCriteria.
  Throws:
    `IllegalArgumentException` - thrown on an invalid sortBy string.

### hashCode

    public int hashCode()

  Deprecated.
  Override the hashCode because we overrid equals().

### toString

    public String toString()

  Deprecated.
  Convert to a string.

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2005 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005 BEA Systems, Inc. All Rights Reserved