|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.endeca.navigation.analytics.OrderBy
public class OrderBy
An OrderBy
defines an ordering on a set of records, based on the
natural ordering of the specified field. Records can be ordered by any of
their property, dimension, or derived values, by ascending or descending sort,
in any combination. OrderBy
instances are encapsulated in
an OrderByList
, which in turn is set in the Statement
.
Constructor Summary | |
---|---|
OrderBy(String _field,
boolean isAscending)
Constructs a new OrderBy that specifies a sort
on an Endeca property or dimension indicated by _field in a
sort direction specified by isAscending . |
Method Summary | |
---|---|
String |
getFieldName()
Get the name of the sorting property or dimension for this OrderBy . |
boolean |
isAscending()
Indicates the sort direction of this OrderBy . |
void |
setAscending(boolean _isAsc)
Sets the sort direction of this OrderBy . |
void |
setFieldName(String f)
Sets the name of the sorting property or dimension for this OrderBy . |
String |
toString()
Returns the string form of this OrderBy . |
String |
toWire()
Returns the wire format of this OrderBy . |
void |
validateSyntax()
Validates the syntax of this OrderBy . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public OrderBy(String _field, boolean isAscending)
OrderBy
that specifies a sort
on an Endeca property or dimension indicated by _field
in a
sort direction specified by isAscending
. For example, this code:
OrderByList o = new OrderByList();
o.add(new OrderBy("Total", false));
specifies an ordering based on the Total property with
a descending sort of the records.
_field
- the name of the Endeca property or dimension
by which the records will be sorted.isAscending
- specifies the sort direction: true
for an ascending sort
order or false
for a descending sort.Method Detail |
---|
public String getFieldName()
OrderBy
.
public void setFieldName(String f)
OrderBy
.
f
- the name of the Endeca property or dimension
by which the records will be ordered.public boolean isAscending()
OrderBy
.
true
if this OrderBy
specifies an
ascending sort or false
for a descending sort.public void setAscending(boolean _isAsc)
OrderBy
.
_isAsc
- specify true
to set an ascending sort or
false
for a descending sort.public String toString()
OrderBy
. For an ascending sort,
the format is:
key-sort-name ASCFor a descending sort, the format is:
key-sort-name DESCwhere key-sort-name is the Endeca property or dimension by which the records will be sorted.
For example:
YearSales ASC
is returned if the sorting key is a property named YearSales
and an ascending sort direction has been set.
toString
in interface QueryNode
toString
in class Object
OrderBy
in the specified format.public String toWire()
OrderBy
. This method is not
intended for public use because the wire format is subject to change.
toWire
in interface QueryNode
OrderBy
.public void validateSyntax() throws SyntaxException
OrderBy
.
An OrderBy
is valid if the key sorting name
is non-null and non-empty.
validateSyntax
in interface QueryNode
SyntaxException
- if the syntax requirements are not satisfied.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |