public final class QueryList<E> extends Object implements List<E>, RandomAccess, Cloneable, Serializable
| Constructor and Description |
|---|
QueryList() |
QueryList(Collection<E> dataList) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E o) |
void |
add(int index,
E element) |
boolean |
addAll(Collection<? extends E> c) |
boolean |
addAll(int index,
Collection<? extends E> c) |
void |
clear() |
QueryList<E> |
clone() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
boolean |
equals(Object o) |
QueryList<E> |
filter(Operator operator)
filters querylist which contains only those beans which satisfies the operator condition.
|
E |
get(int index) |
int |
hashCode() |
int |
indexOf(Object o) |
boolean |
isEmpty() |
Iterator<E> |
iterator() |
int |
lastIndexOf(Object o) |
ListIterator<E> |
listIterator() |
ListIterator<E> |
listIterator(int index) |
E |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
E |
set(int index,
E element) |
int |
size() |
boolean |
sort(String fieldName)
Overridden method for sorting.
|
boolean |
sort(String[] fieldNames,
boolean ascending)
sorts the QueryList by the fieldNames in ascending or descending order.
|
boolean |
sort(String[] fieldNames,
boolean[] ascending)
sorts the QueryList by the fieldNames in ascending or descending order.
|
boolean |
sort(String fieldName,
boolean ascending)
sorts the QueryList by the fieldName in ascending or descending order.
|
boolean |
sort(String fieldName,
boolean ascending,
boolean ignoreCase)
sorts the QueryList by the fieldName in ascending or descending order.
|
List<E> |
subList(int fromIndex,
int toIndex) |
double |
sum(String fieldName)
calculates the sum of the field in this QueryList.
|
double |
sum(String fieldName,
Class arg,
Object value)
calculates the sum of the field in this QueryList.
|
double |
sum(String fieldName,
Operator operator)
calculates the sum of the field in this QueryList.
|
BudgetDecimal |
sumObjects(String fieldName)
calculates the sum of the Objects of the specified field in this QueryList.
|
BudgetDecimal |
sumObjects(String fieldName,
Operator operator)
calculates the sum of the field in this QueryList.
|
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
List<E> |
toArrayList() |
String |
toString() |
public QueryList()
public QueryList(Collection<E> dataList)
public boolean sort(String fieldName)
fieldName - field which is used to sort the bean.public boolean sort(String fieldName, boolean ascending)
fieldName - field which is used to sort the bean.ascending - if true sorting is done in ascending order,
else sorting is done in descending order.public boolean sort(String fieldName, boolean ascending, boolean ignoreCase)
ignoreCase - use only when comparing strings. as default implementation uses case sensitive comparison.fieldName - field which is used to sort the bean.ascending - if true sorting is done in ascending order,
else sorting is done in descending order.public boolean sort(String[] fieldNames, boolean ascending)
fieldNames - fields which is used to sort the bean.ascending - if true sorting is done in ascending order,
else sorting is done in descending order.public boolean sort(String[] fieldNames, boolean[] ascending)
fieldNames - fields which is used to sort the bean.ascending - if true sorting is done in ascending order,
else sorting is done in descending order.public QueryList<E> filter(Operator operator)
operator - Operator.public double sum(String fieldName)
fieldName - field of bean whose sum has to be calculated.public BudgetDecimal sumObjects(String fieldName)
fieldName - field of bean whose sum has to be calculated.public double sum(String fieldName, Class arg, Object value)
fieldName - field of bean whose sum has to be calculated.arg - argument for the getter method of field if it takes any argumnt,
else can be null.value - value for the argument, else can be null.public double sum(String fieldName, Operator operator)
fieldName - field of bean whose sum has to be calculated.operator - to get filrtered vector on which sum will be called.public BudgetDecimal sumObjects(String fieldName, Operator operator)
fieldName - field of bean whose sum has to be calculated.operator - to get filrtered vector on which sum will be called.public boolean add(E o)
public boolean addAll(Collection<? extends E> c)
public boolean addAll(int index,
Collection<? extends E> c)
public void clear()
public boolean contains(Object o)
public boolean containsAll(Collection<?> c)
containsAll in interface Collection<E>containsAll in interface List<E>public boolean equals(Object o)
public int hashCode()
public boolean isEmpty()
public int lastIndexOf(Object o)
lastIndexOf in interface List<E>public ListIterator<E> listIterator()
listIterator in interface List<E>public ListIterator<E> listIterator(int index)
listIterator in interface List<E>public boolean remove(Object o)
public boolean removeAll(Collection<?> c)
public boolean retainAll(Collection<?> c)
public int size()
public Object[] toArray()
public <T> T[] toArray(T[] a)
Copyright © 2013 The Kuali Foundation. All Rights Reserved.