Last update: 2011-06-23

org.proteios.core
Class ItemResultList<I extends BasicItem>

java.lang.Object
  extended by org.proteios.core.ItemResultList<I>
All Implemented Interfaces:
Iterable<I>, Collection<I>, List<I>, QueryResult, ResultList<I>

public class ItemResultList<I extends BasicItem>
extends Object

Return the results of an ItemQuery as a list.

Version:
2.0
Author:
Samuel, Nicklas
See Also:
ItemQuery.list(DbControl)
Last modified
$Date: 2009-04-09 08:48:11 +0200 (Thu, 09 Apr 2009) $

Method Summary
 boolean add(I o)
          Not supported.
 void add(int index, I element)
          Not supported.
 boolean addAll(Collection<? extends I> c)
          Not supported.
 boolean addAll(int index, Collection<? extends I> c)
          Not supported.
 void clear()
          Not supported.
 boolean contains(Object o)
           
 boolean containsAll(Collection<?> c)
           
 boolean equals(Object o)
           
 I get(int index)
          Get a BasicItem derived object.
 Item getItemType()
          Get the type of items contained in this list.
 int getTotalCount()
          Get the total number of items returned by the query, ignoring any limits set by Query.setFirstResult(int) and Query.setMaxResults(int).
 int hashCode()
           
 int indexOf(Object o)
           
 boolean isEmpty()
           
 Iterator<I> iterator()
           
 int lastIndexOf(Object o)
           
 ListIterator<I> listIterator()
           
 ListIterator<I> listIterator(int index)
           
 I remove(int index)
          Not supported.
 boolean remove(Object o)
          Not supported.
 boolean removeAll(Collection<?> c)
          Not supported.
 boolean retainAll(Collection<?> c)
          Not supported.
 I set(int index, I element)
          Not supported.
 int size()
           
 List<I> subList(int fromIndex, int toIndex)
           
 Object[] toArray()
           
<T> T[]
toArray(T[] a)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

contains

public boolean contains(Object o)

get

public I get(int index)
Get a BasicItem derived object.

Returns:
Object of type I or null if no valid item object could be fetched with the internal data object

indexOf

public int indexOf(Object o)

lastIndexOf

public int lastIndexOf(Object o)

isEmpty

public boolean isEmpty()

iterator

public Iterator<I> iterator()

listIterator

public ListIterator<I> listIterator()

listIterator

public ListIterator<I> listIterator(int index)

size

public int size()

subList

public List<I> subList(int fromIndex,
                       int toIndex)

toArray

public Object[] toArray()

toArray

public <T> T[] toArray(T[] a)

equals

public boolean equals(Object o)
Specified by:
equals in interface Collection<I extends BasicItem>
Specified by:
equals in interface List<I extends BasicItem>
Overrides:
equals in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface Collection<I extends BasicItem>
Specified by:
hashCode in interface List<I extends BasicItem>
Overrides:
hashCode in class Object

getItemType

public Item getItemType()
Get the type of items contained in this list.

Returns:
An Item object or null if not known

getTotalCount

public int getTotalCount()
Description copied from interface: QueryResult
Get the total number of items returned by the query, ignoring any limits set by Query.setFirstResult(int) and Query.setMaxResults(int). If the Query.setReturnTotalCount(boolean) hasn't been enabled this method may not return a correct value.

Specified by:
getTotalCount in interface QueryResult
Returns:
The total number of items, or -1 if not known
See Also:
Query.setReturnTotalCount(boolean)

add

public boolean add(I o)
Not supported.

Specified by:
add in interface Collection<I>
Specified by:
add in interface List<I>
Throws:
UnsupportedOperationException - Always

add

public void add(int index,
                I element)
Not supported.

Specified by:
add in interface List<I>
Throws:
UnsupportedOperationException - Always

addAll

public boolean addAll(Collection<? extends I> c)
Not supported.

Specified by:
addAll in interface Collection<I>
Specified by:
addAll in interface List<I>
Throws:
UnsupportedOperationException - Always

addAll

public boolean addAll(int index,
                      Collection<? extends I> c)
Not supported.

Specified by:
addAll in interface List<I>
Throws:
UnsupportedOperationException - Always

clear

public void clear()
Not supported.

Specified by:
clear in interface Collection<I>
Specified by:
clear in interface List<I>
Throws:
UnsupportedOperationException - Always

containsAll

public boolean containsAll(Collection<?> c)
Specified by:
containsAll in interface Collection<I>
Specified by:
containsAll in interface List<I>

remove

public I remove(int index)
Not supported.

Specified by:
remove in interface List<I>
Throws:
UnsupportedOperationException - Always

remove

public boolean remove(Object o)
Not supported.

Specified by:
remove in interface Collection<I>
Specified by:
remove in interface List<I>
Throws:
UnsupportedOperationException - Always

removeAll

public boolean removeAll(Collection<?> c)
Not supported.

Specified by:
removeAll in interface Collection<I>
Specified by:
removeAll in interface List<I>
Throws:
UnsupportedOperationException - Always

retainAll

public boolean retainAll(Collection<?> c)
Not supported.

Specified by:
retainAll in interface Collection<I>
Specified by:
retainAll in interface List<I>
Throws:
UnsupportedOperationException - Always

set

public I set(int index,
             I element)
Not supported.

Specified by:
set in interface List<I>
Throws:
UnsupportedOperationException - Always

Last update: 2011-06-23