|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.4) E14255-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bea.content.expression.SortCriteria
public class SortCriteria
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. If not using full text search, the property must either be a system property or an explicit property.
System properties are enumeraed in the com.bea.content.expression.IMetadataQuery class.
Explicit properties may be specified by the user, in addition to those that exist OOTB: "cm_nodeName", "cm_value","cm_lifeCycleStatus", "cm_isContent", "cm_isHierarchy", "cm_isHierarchy", "cm_objectClass", "cm_path", "cm_createdBy", "cm_createdDate", "cm_objectClassInstance", "cm_parent_uid", "cm_version", "cm_versionComment", "cm_checkedOut", "cm_assignedToUser", "cm_role", "cm_uid", "cm_modifiedBy", "cm_modifiedDate", "cm_contentType", "cm_binarySize", "cm_binaryName"
For more complex queries, rather than SortCriteria, use the Search constructor that takes a sort string. See the javadocs on the Search class for examples.
Field Summary | |
---|---|
boolean |
isAscending
The ascending or descending order. |
String |
propertyName
The property name to sort on. |
String |
propertySet
The property set name. |
Constructor Summary | |
---|---|
SortCriteria(String propertyName)
Constructor. |
|
SortCriteria(String propertyName,
boolean isAscending)
Constructor. |
|
SortCriteria(String propertySet,
String propertyName,
boolean isAscending)
Deprecated The property set is no longer being used in SortCriteria |
Method Summary | |
---|---|
Object |
clone()
Clone this object. |
int |
compareTo(Object obj)
Compare this object to another object. |
boolean |
equals(Object o)
Determine if this object is equal to another object. |
static SortCriteria[] |
getSortCriteria(String sortBy)
Parse the given sort string and return an array of SortCriteria. |
int |
hashCode()
Override the hashCode because we override equals(). |
String |
toString()
Convert to a string. |
static String |
toString(SortCriteria[] sort)
Convert an array of sort criteria to a sort clause. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public String propertySet
public String propertyName
public boolean isAscending
Constructor Detail |
---|
@Deprecated public SortCriteria(String propertySet, String propertyName, boolean isAscending)
propertySet
- The property set to sort on. No longer used.propertyName
- The property name to sort on.isAscending
- True if this should sort ascending. Defaults to true.public SortCriteria(String propertyName, boolean isAscending)
propertyName
- The property name to sort on.isAscending
- True if this should sort ascending. Defaults to true.public SortCriteria(String propertyName)
propertyName
- The property name to sort on.Method Detail |
---|
public Object clone()
clone
in class Object
public int compareTo(Object obj)
compareTo
in interface Comparable
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public static SortCriteria[] getSortCriteria(String sortBy) throws IllegalArgumentException
sortBy
- the sort string (e.g. "identifier ASC, creationDate
DESC").
IllegalArgumentException
- thrown on an invalid sortBy string.public String toString()
toString
in class Object
public static String toString(SortCriteria[] sort)
This will return a sort clause that, if parsed, will return the equivalent SortCriteria objects as those passed. It will not, however, neccessarily be the same sort clause that might have generated the incoming SortCriteria.
|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.4) E14255-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |