public class UnmodifiableResultList<T> extends ArrayList<T> implements ResultList<T>
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID |
private long |
totalCount |
modCount
Constructor and Description |
---|
UnmodifiableResultList(List<T> items,
long totalCount) |
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
T element)
Not supported.
|
boolean |
add(T o)
Not supported.
|
boolean |
addAll(Collection<? extends T> c)
Not supported.
|
boolean |
addAll(int index,
Collection<? extends T> c)
Not supported.
|
void |
clear()
Not supported.
|
boolean |
containsAll(Collection<?> c) |
long |
getTotalCount()
Get the total number of items returned by the query, ignoring
any limits set by
Query.setFirstResult(int) and
Query.setMaxResults(int) . |
T |
remove(int index)
Not supported.
|
boolean |
remove(Object o)
Not supported.
|
boolean |
removeAll(Collection<?> c)
Not supported.
|
boolean |
retainAll(Collection<?> c)
Not supported.
|
T |
set(int index,
T element)
Not supported.
|
clone, contains, ensureCapacity, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, removeRange, size, subList, toArray, toArray, trimToSize
equals, hashCode
toString
finalize, getClass, notify, notifyAll, wait, wait, wait
contains, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, size, subList, toArray, toArray
private static final long serialVersionUID
private final long totalCount
public long getTotalCount()
QueryResult
Query.setFirstResult(int)
and
Query.setMaxResults(int)
. If the
Query.setReturnTotalCount(boolean)
hasn't been enabled this method may
not return a correct value.getTotalCount
in interface QueryResult
Query.setReturnTotalCount(boolean)
public boolean add(T o)
add
in interface Collection<T>
add
in interface List<T>
add
in class ArrayList<T>
UnsupportedOperationException
- Alwayspublic void add(int index, T element)
public boolean addAll(Collection<? extends T> c)
addAll
in interface Collection<T>
addAll
in interface List<T>
addAll
in class ArrayList<T>
UnsupportedOperationException
- Alwayspublic boolean addAll(int index, Collection<? extends T> c)
public void clear()
clear
in interface Collection<T>
clear
in interface List<T>
clear
in class ArrayList<T>
UnsupportedOperationException
- Alwayspublic boolean containsAll(Collection<?> c)
containsAll
in interface Collection<T>
containsAll
in interface List<T>
containsAll
in class AbstractCollection<T>
public T remove(int index)
public boolean remove(Object o)
remove
in interface Collection<T>
remove
in interface List<T>
remove
in class ArrayList<T>
UnsupportedOperationException
- Alwayspublic boolean removeAll(Collection<?> c)
removeAll
in interface Collection<T>
removeAll
in interface List<T>
removeAll
in class ArrayList<T>
UnsupportedOperationException
- Alwayspublic boolean retainAll(Collection<?> c)
retainAll
in interface Collection<T>
retainAll
in interface List<T>
retainAll
in class ArrayList<T>
UnsupportedOperationException
- Always