|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection<E> java.util.AbstractList com.endeca.navigation.analytics.GroupByList
public class GroupByList
A GroupByList
is a list of GroupBy
instances,
each of which represent a single dimension of record grouping.
Additionally, the GroupByList
may be tagged with
a method for computing subtotal aggregates, which are basically
aggregates grouped by subsets of the GroupBy
dimensions.
If an empty GroupByList
is attached to a Statement
,
this indicates that the input records will be GROUPed to a single record.
Field Summary |
---|
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
GroupByList()
Constructs a new, empty GroupByList . |
Method Summary | |
---|---|
void |
add(int index,
Object obj)
Inserts a GroupBy object at position index . |
Object |
get(int index)
Gets the GroupBy object at position index . |
Object |
remove(int index)
Removes the GroupBy at the specified position in this list. |
Object |
set(int index,
Object obj)
Replaces the GroupBy object at position index
with the the GroupBy object specified by obj . |
int |
size()
Returns the number of GroupBy objects in this GroupByList . |
String |
toString()
Returns the string form of this GroupByList . |
String |
toWire()
Returns the wire format of this GroupByList . |
void |
validateSyntax()
Validates the syntax of this GroupByList . |
Methods inherited from class java.util.AbstractList |
---|
add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList |
Methods inherited from class java.util.AbstractCollection |
---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, removeAll, retainAll, subList, toArray, toArray |
Constructor Detail |
---|
public GroupByList()
GroupByList
.
Method Detail |
---|
public Object get(int index)
GroupBy
object at position index
.
get
in interface List
get
in class AbstractList
index
- offset of the desired GroupBy
object.
GroupBy
object at position index
.
IndexOutOfBoundsException
- if index
is out of range.public int size()
GroupBy
objects in this GroupByList
.
size
in interface Collection
size
in interface List
size
in class AbstractCollection
GroupBy
objects in the list.public Object set(int index, Object obj)
GroupBy
object at position index
with the the GroupBy
object specified by obj
.
set
in interface List
set
in class AbstractList
index
- offset of the GroupBy
object to replace.obj
- the GroupBy
object to store.
GroupBy
object previously at position index
.
IndexOutOfBoundsException
- if index
is out of range.
IllegalArgumentException
- if obj
is not a GroupBy
.public void add(int index, Object obj)
GroupBy
object at position index
.
Shifts the GroupBy
element currently at that position (if any) and
any subsequent GroupBy
elements to the right (adds one to their indices).
add
in interface List
add
in class AbstractList
index
- offset at which the GroupBy
is to be inserted.obj
- the GroupBy
to be inserted.
IndexOutOfBoundsException
- if index
is out of range.
IllegalArgumentException
- if obj
is not a GroupBy
.public Object remove(int index)
GroupBy
at the specified position in this list.
Shifts any subsequent GroupBy
elements to the left (subtracts one from
their indices). Returns the GroupBy
that was removed from the list.
remove
in interface List
remove
in class AbstractList
index
- offset of the GroupBy
to be removed.
GroupBy
previously at position index
.
IndexOutOfBoundsException
- if index
is out of range.public String toString()
GroupByList
.
"GROUP" is returned if the GroupByList
is empty.
The format for a GroupByList
with one or more
GroupBy
objects is:
GROUP BY grouping-key-name1, ...For example:
GROUP BY Region, Year
is returned if the aggregated records are grouped by the Region
and Year combination.
toString
in interface QueryNode
toString
in class AbstractCollection
GroupByList
in the specified format.public String toWire()
GroupByList
. This method is not
intended for public use because the wire format is subject to change.
toWire
in interface QueryNode
GroupByList
.public void validateSyntax() throws SyntaxException
GroupByList
.
A GroupByList
is valid if any GroupBy
element it contains is itself valid. An empty GroupByList
is valid because it represents grouping to a single record (bucket).
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 |