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

## oracle.ifs.search
Class SearchSortSpecification

    java.lang.Object
      oracle.ifs.search.SearchSortSpecification

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable

    public final class SearchSortSpecification

extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

A SearchSortSpecification represents the order-by-clause of the Select statement. Attribute names can be qualified by the SearchClass. Also provides a way to specify ASCENDING or DESCEDING order based on the attribute.

>      // Usage Examples.
>      //
>      // Following code shows a SearchSortSpecification which represents
>      // ORDER by DOCUMENT.NAME, FOLDER.NAME
>      //
>      // Array of classes involved in the order by clause
>      // Remember to use aliases if they are specified.
>      String [] sortClasses = new String[] {"DOCUMENT", "FOLDER"}
>      //
>      // Array of Attribute Names to match class names.
>      String [] attNames = new String[] {"NAME", "NAME"}
>      //
>      // Order of Sort for each sort element
>      boolean [] orders = new boolean[] {true, false}
>      //
>      // Create the SortSpecification
>      SearchSortSpecification someSortSpec = new SearchSortSpecification(sortClasses, attNames, orders);

>      // To do case insensitive sorting, use the constructor  or add method
>      // variant that takes a sqlfunction as parameter and pass nls_upper
>      // as the name of the sql function that needs to be used.

>      someSortSpec.add(Document.CLASS_NAME, "NAME", true, "nls_upper");

>      // To sort based on Context scores, look for example in javadoc of
>      // ContextQualification.

See Also:
  Serialized Form
(Published)

Field Summary
`static boolean` | `ASCENDING`
`static boolean` | `DESCENDING`
`protected java.util.Vector` | `m_Attributes` The Sort Attributes.
`protected java.util.Vector` | `m_Classes` The classes of the sort Attributes.
`protected java.lang.String` | `m_DefaultClass` The default Search Class.
`protected java.util.Vector` | `m_Orders` The Sort Orders.
`protected java.util.Vector` | `m_SqlFunctions` Sql functions that may be used with the sort.

Constructor Summary
`SearchSortSpecification()` Constructs a SearchSortSpecification, calls this(null).
`SearchSortSpecification(java.lang.String defaultClass)` Constructs a SearchSortSpecification.
`SearchSortSpecification(java.lang.String[] classes, java.lang.String[] attributes, boolean[] orders)` Constructs a SearchSortSpecification.
`SearchSortSpecification(java.lang.String[] classes, java.lang.String[] attributes, boolean[] orders, java.lang.String[] functions)` Constructs a SearchSortSpecification.

Method Summary
`void` | `add(java.lang.String[] sortAttributes, boolean[] sortOrders)` Adds the unqualified attributes to the sort list.
`void` | `add(java.lang.String[] sortClasses, java.lang.String[] sortAttributes, boolean[] sortOrders)` Add Attributes to sort list.
`void` | `add(java.lang.String[] sortClasses, java.lang.String[] sortAttributes, boolean[] sortOrders, java.lang.String[] sortFunctions)` Add Attributes to sort list.
`void` | `add(java.lang.String sortAttribute, boolean sortOrder)` Adds the unqualified attribute to the end of the sort list.
`void` | `add(java.lang.String sortClass, java.lang.String sortAttribute, boolean sortOrder)` Add an attribute to the end of the sort list.
`void` | `add(java.lang.String sortClass, java.lang.String sortAttribute, boolean sortOrder, java.lang.String sqlFunction)` Add an attribute to the end of the sort list.
`java.lang.Object` | `clone()` Returns a clone of this SearchClassSpecification.
`java.lang.String[]` | `getAttributeNames()` Gets the list of Sort Attribute names.
`java.lang.String[]` | `getClassnames()` Returns the Class names of the sort Attributes.
`boolean[]` | `getOrders()` Returns the sort Orders of the Sort Attributes.
`java.lang.String[]` | `getSqlFunctions()` Gets the list of sql function names.

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

Field Detail

### ASCENDING

    public static boolean ASCENDING

(Published)

### DESCENDING

    public static boolean DESCENDING

(Published)

### m_Classes

    protected java.util.Vector m_Classes

  Description copied from class: `SearchSortSpecification`
  The classes of the sort Attributes.

  (Unpublished)

### m_Attributes

    protected java.util.Vector m_Attributes

  Description copied from class: `SearchSortSpecification`
  The Sort Attributes.

### m_Orders

    protected java.util.Vector m_Orders

  Description copied from class: `SearchSortSpecification`
  The Sort Orders.

  (Unpublished)

### m_DefaultClass

    protected java.lang.String m_DefaultClass

  Description copied from class: `SearchSortSpecification`
  The default Search Class.

  (Unpublished)

### m_SqlFunctions

    protected java.util.Vector m_SqlFunctions

  Description copied from class: `SearchSortSpecification`
  Sql functions that may be used with the sort.

  (Unpublished)

Constructor Detail

### SearchSortSpecification

    public SearchSortSpecification(java.lang.String defaultClass)

  Constructs a SearchSortSpecification. The sort list is set to an empty list. User can specify the default Class for the attributes.

  Parameters:
    `defaultClass` - default Class for sort Attributes
  (Published)

### SearchSortSpecification

    public SearchSortSpecification()

  Constructs a SearchSortSpecification, calls this(null).

  (Published)

### SearchSortSpecification

    public SearchSortSpecification(java.lang.String[] classes,
                                   java.lang.String[] attributes,
                                   boolean[] orders)
                            throws IfsException

  Constructs a SearchSortSpecification. Initializes Sort list with specified attributes. Call the constructor that takes classes, attributes, orders and functions as parameters. Passes null for the functions parameter.

  Parameters:
    `classes` - Classes for the sort Attributes
    `attributes` - Sort Attributes
    `orders` - Sort Order for each attribute, true implies ascending, false implies descending.
  Throws:
    `IfsException` - if adding sort Attributes fails.
  (Published)

### SearchSortSpecification

    public SearchSortSpecification(java.lang.String[] classes,
                                   java.lang.String[] attributes,
                                   boolean[] orders,
                                   java.lang.String[] functions)
                            throws IfsException

  Constructs a SearchSortSpecification. Initializes Sort list with specified attributes. Calls add(classes, attributes, orders, functions)

  Parameters:
    `classes` - Classes for the sort Attributes
    `attributes` - Sort Attributes
    `orders` - Sort Order for each attribute, true implies ascending, false implies descending.
    `functions` - Sql function that is to be wrapped around each function
  Throws:
    `IfsException` - if adding sort Attributes fails.
  (Published)

Method Detail

### add

    public void add(java.lang.String[] sortClasses,
                    java.lang.String[] sortAttributes,
                    boolean[] sortOrders,
                    java.lang.String[] sortFunctions)
             throws IfsException

  Description copied from class: `SearchSortSpecification`
  Add Attributes to sort list. Attributes are added to the end of the existing list. Calls `add `on each attribute in the list.

  ``
  Parameters:
    `sortClasses` - list of classes, each entry specifies the class of the corresponding entry in the attribute list.
    `sortAttributes` - list of sort Attributes
    `sortOrders` - order of sorting attribute, true implies ascending, false implies descending. If this null, then ascending is assumed for all attributes.
    `sortFunctions` - sql functions that need to be wrapped around the attributes
  Throws:
    `IfsException` - if operation fails
  (Published)

### add

    public void add(java.lang.String[] sortClasses,
                    java.lang.String[] sortAttributes,
                    boolean[] sortOrders)
             throws IfsException

  Description copied from class: `SearchSortSpecification`
  Add Attributes to sort list. Attributes are added to the end of the existing list. Calls `add `on each attribute in the list.

  ``
  Parameters:
    `sortClasses` - list of classes, each entry specifies the class of the corresponding entry in the attribute list.
    `sortAttributes` - list of sort Attributes
    `sortOrders` - order of sorting attribute, true implies ascending, false implies descending. If this null, then ascending is assumed for all attributes.
  Throws:
    `IfsException` - if operation fails
  (Published)

### add

    public void add(java.lang.String[] sortAttributes,
                    boolean[] sortOrders)
             throws IfsException

  Description copied from class: `SearchSortSpecification`
  Adds the unqualified attributes to the sort list. The default Class is assumed for these attributes. Calls add(null, sortAttributes, sortOrders)

  Parameters:
    `sortAttributes` - list of sort Attributes
    `sortOrders` - order of sorting attribute
  Throws:
    `IfsException` - if operation fails
  See Also:
    `SearchSortSpecification.add(String[], String[], boolean[])`
  (Published)

### add

    public void add(java.lang.String sortClass,
                    java.lang.String sortAttribute,
                    boolean sortOrder,
                    java.lang.String sqlFunction)
             throws IfsException

  Description copied from class: `SearchSortSpecification`
  Add an attribute to the end of the sort list.

  Parameters:
    `sortClass` - Class of attribute, defaultClass is used if this is null.
    `sortAttribute` - sort Attribute
    `sortOrder` - order of sorting, true implies ascending, false implies descending
    `sqlFunction` - any sql function call that needs to be wrapped around the attribute; Use "nls_upper" function to sort case insensitively.
  Throws:
    `IfsException` - is the operation fails
  (Published)

### add

    public void add(java.lang.String sortClass,
                    java.lang.String sortAttribute,
                    boolean sortOrder)
             throws IfsException

  Description copied from class: `SearchSortSpecification`
  Add an attribute to the end of the sort list.

  Parameters:
    `sortClass` - Class of attribute, defaultClass is used if this is null.
    `sortAttribute` - sort Attribute
    `sortOrder` - order of sorting, true implies ascending, false implies descending
  Throws:
    `IfsException` - is the operation fails
  (Published)

### add

    public void add(java.lang.String sortAttribute,
                    boolean sortOrder)
             throws IfsException

  Description copied from class: `SearchSortSpecification`
  Adds the unqualified attribute to the end of the sort list.

  Parameters:
    `sortAttribute` - sort Attribute
    `sortOrder` - order of sorting, true implies ascending, false implies descending
  Throws:
    `IfsException` - if the operation fails
  (Published)

### getClassnames

    public java.lang.String[] getClassnames()
                                     throws IfsException

  Description copied from class: `SearchSortSpecification`
  Returns the Class names of the sort Attributes. The entries correspond to the entries in the array returned by getAttributeNames.

  Returns:
    String array representing classes of Sort Attributes.
  Throws:
    `IfsException` - if the operation fails
  (Published)

### getAttributeNames

    public java.lang.String[] getAttributeNames()
                                         throws IfsException

  Description copied from class: `SearchSortSpecification`
  Gets the list of Sort Attribute names.

  Returns:
    list of Sort Attribute names.
  Throws:
    `IfsException` - if the operation fails
  (Published)

### getSqlFunctions

    public java.lang.String[] getSqlFunctions()
                                       throws IfsException

  Description copied from class: `SearchSortSpecification`
  Gets the list of sql function names.

  Returns:
    list of sql function names.
  Throws:
    `IfsException` - if the operation fails
  (Published)

### getOrders

    public boolean[] getOrders()
                        throws IfsException

  Description copied from class: `SearchSortSpecification`
  Returns the sort Orders of the Sort Attributes. The entries correspond to the entries in the array returned by getAttributeNames.

  Returns:
    boolean array representing sort order of Sort Attributes.
  Throws:
    `IfsException` - if the operation fails
  (Published)

### clone

    public java.lang.Object clone()

  Description copied from class: `SearchSortSpecification`
  Returns a clone of this SearchClassSpecification.

  Overrides:
    `clone` in class `java.lang.Object`
  Returns:
    Return a clone of this SearchClassSpecification.
  (Published)

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