Class AbstractLazyLoadList<E>

  • Type Parameters:
    E - Type of the element of this list
    All Implemented Interfaces:
    Iterable<E>, Collection<E>, List<E>
    Direct Known Subclasses:

    public abstract class AbstractLazyLoadList<E>
    extends Object
    implements List<E>
    Abstract implementation of a lazy loaded list of (persistent) objects. Needs to be extended to implement the retrieveObjectForIndex() method to retrieve the object at the specified index from whatever datasource is being used, and to implement the getSize() method to return the size of the list. The "datasource" could be results for a query, or a connection to a datastore, or whatever ... just a source of objects. TODO Change Localised message numbers to be generic
    • Field Detail

      • size

        protected int size
        Cached size of the list. -1 when not known.
    • Constructor Detail

      • AbstractLazyLoadList

        public AbstractLazyLoadList​(String cacheType)
        Constructor for a lazy load list.
        cacheType - Type of caching of objects in the list