|
Oracle Content Management SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.ifs.search.SearchSortSpecification
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.
Field Summary | |
static boolean |
ASCENDING
|
static boolean |
DESCENDING
|
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. |
Field Detail |
public static boolean ASCENDING
public static boolean DESCENDING
Constructor Detail |
public SearchSortSpecification(java.lang.String defaultClass)
defaultClass
- default Class for sort Attributespublic SearchSortSpecification()
public SearchSortSpecification(java.lang.String[] classes, java.lang.String[] attributes, boolean[] orders) throws IfsException
classes
- Classes for the sort Attributesattributes
- Sort Attributesorders
- Sort Order for each attribute, true implies ascending,
false implies descending.IfsException
- if adding sort Attributes fails.public SearchSortSpecification(java.lang.String[] classes, java.lang.String[] attributes, boolean[] orders, java.lang.String[] functions) throws IfsException
classes
- Classes for the sort Attributesattributes
- Sort Attributesorders
- Sort Order for each attribute, true implies ascending,
false implies descending.functions
- Sql function that is to be wrapped around each functionIfsException
- if adding sort Attributes fails.Method Detail |
public void add(java.lang.String[] sortClasses, java.lang.String[] sortAttributes, boolean[] sortOrders, java.lang.String[] sortFunctions) throws IfsException
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 AttributessortOrders
- 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
public void add(java.lang.String[] sortClasses, java.lang.String[] sortAttributes, boolean[] sortOrders) throws IfsException
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 AttributessortOrders
- 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
public void add(java.lang.String[] sortAttributes, boolean[] sortOrders) throws IfsException
sortAttributes
- list of sort AttributessortOrders
- order of sorting attributeIfsException
- if operation failsadd(String[], String[], boolean[])
public void add(java.lang.String sortClass, java.lang.String sortAttribute, boolean sortOrder, java.lang.String sqlFunction) throws IfsException
sortClass
- Class of attribute, defaultClass is used if this is null.sortAttribute
- sort AttributesortOrder
- order of sorting, true implies ascending, false implies
descendingsqlFunction
- any sql function call that needs to be wrapped around the
attribute; Use "nls_upper" function to sort case insensitively.IfsException
- is the operation failspublic void add(java.lang.String sortClass, java.lang.String sortAttribute, boolean sortOrder) throws IfsException
sortClass
- Class of attribute, defaultClass is used if this is null.sortAttribute
- sort AttributesortOrder
- order of sorting, true implies ascending, false implies
descendingIfsException
- is the operation failspublic void add(java.lang.String sortAttribute, boolean sortOrder) throws IfsException
sortAttribute
- sort AttributesortOrder
- order of sorting, true implies ascending, false implies
descendingIfsException
- if the operation failspublic java.lang.String[] getClassnames() throws IfsException
IfsException
- if the operation failspublic java.lang.String[] getAttributeNames() throws IfsException
IfsException
- if the operation failspublic java.lang.String[] getSqlFunctions() throws IfsException
IfsException
- if the operation failspublic boolean[] getOrders() throws IfsException
IfsException
- if the operation failspublic java.lang.Object clone()
clone
in class java.lang.Object
|
Oracle Content Management SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |