public class OrderByList extends AbstractList implements List, QueryNode
OrderByList is a list of OrderBy instances.
Unlike a GroupByList, an OrderByList may not be
empty, because an empty list does not imply a repeatable order.modCount| Constructor and Description |
|---|
OrderByList()
Constructs a new, empy
OrderByList. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
Object obj)
Inserts an
OrderBy object at position index. |
Object |
get(int index)
Gets the
OrderBy object at position index. |
Object |
remove(int index)
Removes the
OrderBy at the specified position in this list. |
Object |
set(int index,
Object obj)
Replaces the
OrderBy object at position index
with the the OrderBy object specified by obj. |
int |
size()
Returns the number of
OrderBy expressions in this OrderByList. |
String |
toString()
Returns the string form of this
OrderByList. |
String |
toWire()
Returns the wire format of this
OrderByList. |
void |
validateSyntax()
Validates the syntax of this
OrderByList. |
add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArrayclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, removeAll, replaceAll, retainAll, sort, spliterator, subList, toArray, toArrayparallelStream, removeIf, streampublic Object get(int index)
OrderBy object at position index.get in interface Listget in class AbstractListindex - offset of the desired OrderBy object.OrderBy object at position index.IndexOutOfBoundsException - if index is out of range.public int size()
OrderBy expressions in this OrderByList.size in interface Collectionsize in interface Listsize in class AbstractCollectionOrderBy elements in the list.public Object set(int index, Object obj)
OrderBy object at position index
with the the OrderBy object specified by obj.set in interface Listset in class AbstractListindex - offset of the OrderBy object to replace.obj - the OrderBy object to store.OrderBy object previously at position index.IndexOutOfBoundsException - if index is out of range.IllegalArgumentException - if obj is not an OrderBy.public void add(int index,
Object obj)
OrderBy object at position index.
Shifts the OrderBy element currently at that position (if any) and
any subsequent OrderBy elements to the right (adds one to their indices).add in interface Listadd in class AbstractListindex - offset at which the OrderBy is to be inserted.obj - the OrderBy to be inserted.IndexOutOfBoundsException - if index is out of range.IllegalArgumentException - if obj is not an OrderBy.public Object remove(int index)
OrderBy at the specified position in this list.
Shifts any subsequent OrderBy elements to the left (subtracts one from
their indices). Returns the OrderBy that was removed from the list.remove in interface Listremove in class AbstractListindex - offset of the OrderBy to be removed.OrderBy previously at position index.IndexOutOfBoundsException - if index is out of range.public String toString()
OrderByList. These are of the format:
ORDER BY key-sort-name1 sortdir, key-sort-name2 sortdir ...where sortdir is either ASC or DESC. For example:
ORDER BY Total DESC
is returned if the sorting key is a property named Total
and a descending sort direction has been set.toString in interface QueryNodetoString in class AbstractCollectionOrderByList.public String toWire()
OrderByList. This method is not
intended for public use because the wire format is subject to change.public void validateSyntax()
throws SyntaxException
OrderByList.
An OrderByList is valid if it is non-empty (must
contain at least one OrderBy element) and all its
OrderBy elements are themselves valid.validateSyntax in interface QueryNodeSyntaxException - if the syntax requirements are not satisfied.© 2003, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle and/or its affiliates Confidential