Package net.sf.basedb.core
Class AbstractResultList<I>
java.lang.Object
net.sf.basedb.core.AbstractResultList<I>
- All Implemented Interfaces:
Iterable<I>
,Collection<I>
,List<I>
,QueryResult
,ResultList<I>
- Direct Known Subclasses:
ItemResultList
This is a list of the result from a query. Objects returned from
this list are of a type derived from BasicItem. This class implements
all operations in the
List
interface that modifies the
list. The implementation simply throws an
UnsupportedOperationException
- Version:
- 2.0
- Author:
- Samuel, Nicklas
- Last modified
- $Date: 2012-09-14 09:28:35 +0200 (fr, 14 sep 2012) $
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Not supported.boolean
Not supported.boolean
addAll
(int index, Collection<? extends I> c) Not supported.boolean
addAll
(Collection<? extends I> c) Not supported.void
clear()
Not supported.boolean
containsAll
(Collection<?> c) long
Get the total number of items returned by the query, ignoring any limits set byQuery.setFirstResult(int)
andQuery.setMaxResults(int)
.remove
(int index) Not supported.boolean
Not supported.boolean
removeAll
(Collection<?> c) Not supported.boolean
retainAll
(Collection<?> c) Not supported.Not supported.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
contains, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, replaceAll, size, sort, spliterator, subList, toArray, toArray
-
Field Details
-
totalCount
private final long totalCount
-
-
Constructor Details
-
AbstractResultList
AbstractResultList(long totalCount)
-
-
Method Details
-
getTotalCount
public long getTotalCount()Description copied from interface:QueryResult
Get the total number of items returned by the query, ignoring any limits set byQuery.setFirstResult(int)
andQuery.setMaxResults(int)
. If theQuery.setReturnTotalCount(boolean)
hasn't been enabled this method may not return a correct value.- Specified by:
getTotalCount
in interfaceQueryResult
- Returns:
- The total number of items, or -1 if not known
- See Also:
-
add
Not supported.- Specified by:
add
in interfaceCollection<I>
- Specified by:
add
in interfaceList<I>
- Throws:
UnsupportedOperationException
- Always
-
add
Not supported.- Specified by:
add
in interfaceList<I>
- Throws:
UnsupportedOperationException
- Always
-
addAll
Not supported.- Specified by:
addAll
in interfaceCollection<I>
- Specified by:
addAll
in interfaceList<I>
- Throws:
UnsupportedOperationException
- Always
-
addAll
Not supported.- Specified by:
addAll
in interfaceList<I>
- Throws:
UnsupportedOperationException
- Always
-
clear
public void clear()Not supported.- Specified by:
clear
in interfaceCollection<I>
- Specified by:
clear
in interfaceList<I>
- Throws:
UnsupportedOperationException
- Always
-
containsAll
- Specified by:
containsAll
in interfaceCollection<I>
- Specified by:
containsAll
in interfaceList<I>
-
remove
Not supported.- Specified by:
remove
in interfaceList<I>
- Throws:
UnsupportedOperationException
- Always
-
remove
Not supported.- Specified by:
remove
in interfaceCollection<I>
- Specified by:
remove
in interfaceList<I>
- Throws:
UnsupportedOperationException
- Always
-
removeAll
Not supported.- Specified by:
removeAll
in interfaceCollection<I>
- Specified by:
removeAll
in interfaceList<I>
- Throws:
UnsupportedOperationException
- Always
-
retainAll
Not supported.- Specified by:
retainAll
in interfaceCollection<I>
- Specified by:
retainAll
in interfaceList<I>
- Throws:
UnsupportedOperationException
- Always
-
set
Not supported.- Specified by:
set
in interfaceList<I>
- Throws:
UnsupportedOperationException
- Always
-