Class ItemResultList<I extends BasicItem>

java.lang.Object
net.sf.basedb.core.AbstractResultList<I>
net.sf.basedb.core.ItemResultList<I>
All Implemented Interfaces:
Iterable<I>, Collection<I>, List<I>, QueryResult, ResultList<I>

public class ItemResultList<I extends BasicItem> extends AbstractResultList<I>
Return the results of an ItemQuery as a list.
Version:
2.0
Author:
Samuel, Nicklas
See Also:
Last modified
$Date: 2015-04-20 11:08:18 +0200 (må, 20 apr 2015) $
  • Field Details

    • data

      private final List<? extends BasicData> data
      The internal list of BasicData objects.
    • dc

      private final DbControl dc
      The DbControl that was used in the query.
    • itemClass

      private final Class<I extends BasicItem> itemClass
      The class of the items returned by the query (and this object).
    • itemType

      private final Item itemType
      The type of items returned by the query.
  • Constructor Details

  • Method Details

    • 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
    • get

      private <E extends BasicItem> E get(Class<E> returnType, BasicData dataObject)