Class BaseLazyLoadItemList<E>

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Iterable<E>, java.util.Collection<E>, java.util.List<E>
    Direct Known Subclasses:
    LazyLoadItemList

    public abstract class BaseLazyLoadItemList<E>
    extends java.util.AbstractList<E>
    implements java.io.Serializable
    Internal, base class for separation internals of LazyLoadItemList. This is suppose to be a non modifiable container for data only stored in cache.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected BaseLazyLoadItemList​(int preFetchSize, java.util.Set<PK> prefetchLanguages, java.util.List<PK> pkList, boolean modifiable)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected void assureIndex​(int listPos)  
      void clear()  
      boolean contains​(java.lang.Object obj)  
      boolean equals​(java.lang.Object obj)  
      abstract E get​(int index)  
      protected ConfigIntf getConfig()  
      PK getPK​(int index)  
      java.util.List<PK> getPKList()  
      protected java.util.List<PK> getPKListInternal()  
      java.util.Set<PK> getPrefetchLanguages()  
      int getPreFetchSize()  
      int hashCode()  
      boolean isModifiable()  
      java.util.Iterator<E> iterator()  
      E remove​(int index)
      Does not completely fulfill the remove() contract.
      E set​(int index, java.lang.Object element)  
      int size()  
      java.lang.String toString()  
      • Methods inherited from class java.util.AbstractList

        add, add, addAll, indexOf, lastIndexOf, listIterator, listIterator, removeRange, subList
      • Methods inherited from class java.util.AbstractCollection

        addAll, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, stream, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.List

        addAll, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
    • Field Detail

      • PREFETCH_SIZE_PROPERTY

        protected static final java.lang.String PREFETCH_SIZE_PROPERTY
        See Also:
        Constant Field Values
      • DEFAULT_PREFETCH_SIZE

        public static final int DEFAULT_PREFETCH_SIZE
        The value for DEFAULT_PREFETCH_SIZE is read from the configuration properties. The key is lazy.pkcollection.prefetchsize.
        See Also:
        Constant Field Values
    • Constructor Detail

      • BaseLazyLoadItemList

        protected BaseLazyLoadItemList​(int preFetchSize,
                                       java.util.Set<PK> prefetchLanguages,
                                       java.util.List<PK> pkList,
                                       boolean modifiable)
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.util.AbstractCollection<E>
      • getPK

        public PK getPK​(int index)
                 throws java.lang.IndexOutOfBoundsException
        Throws:
        java.lang.IndexOutOfBoundsException
      • getPKList

        public java.util.List<PK> getPKList()
      • getPKListInternal

        protected java.util.List<PK> getPKListInternal()
      • set

        public E set​(int index,
                     java.lang.Object element)
        Specified by:
        set in interface java.util.List<E>
        Overrides:
        set in class java.util.AbstractList<E>
      • remove

        public E remove​(int index)
        Does not completely fulfill the remove() contract. To make sure this method does not instantiate the item at the given index, always null is returned.
        Specified by:
        remove in interface java.util.List<E>
        Overrides:
        remove in class java.util.AbstractList<E>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Collection<E>
        Specified by:
        clear in interface java.util.List<E>
        Overrides:
        clear in class java.util.AbstractList<E>
      • get

        public abstract E get​(int index)
        Specified by:
        get in interface java.util.List<E>
        Specified by:
        get in class java.util.AbstractList<E>
      • assureIndex

        protected void assureIndex​(int listPos)
                            throws java.lang.IndexOutOfBoundsException
        Throws:
        java.lang.IndexOutOfBoundsException
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<E>
        Specified by:
        size in interface java.util.List<E>
        Specified by:
        size in class java.util.AbstractCollection<E>
      • contains

        public boolean contains​(java.lang.Object obj)
        Specified by:
        contains in interface java.util.Collection<E>
        Specified by:
        contains in interface java.util.List<E>
        Overrides:
        contains in class java.util.AbstractCollection<E>
      • iterator

        public java.util.Iterator<E> iterator()
        Specified by:
        iterator in interface java.util.Collection<E>
        Specified by:
        iterator in interface java.lang.Iterable<E>
        Specified by:
        iterator in interface java.util.List<E>
        Overrides:
        iterator in class java.util.AbstractList<E>
      • hashCode

        public final int hashCode()
        Specified by:
        hashCode in interface java.util.Collection<E>
        Specified by:
        hashCode in interface java.util.List<E>
        Overrides:
        hashCode in class java.util.AbstractList<E>
      • equals

        public final boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface java.util.Collection<E>
        Specified by:
        equals in interface java.util.List<E>
        Overrides:
        equals in class java.util.AbstractList<E>
      • getPreFetchSize

        public int getPreFetchSize()
      • getPrefetchLanguages

        public java.util.Set<PK> getPrefetchLanguages()
      • isModifiable

        public boolean isModifiable()
        Returns:
        the modifiable