| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.avaje.ebean.common.AbstractBeanCollection<E>
com.avaje.ebean.common.BeanList<E>
public final class BeanList<E>
List capable of lazy loading.
| Nested Class Summary | 
|---|
| Nested classes/interfaces inherited from interface com.avaje.ebean.bean.BeanCollection | 
|---|
| BeanCollection.ModifyListenMode | 
| Field Summary | 
|---|
| Fields inherited from interface com.avaje.ebean.bean.BeanCollection | 
|---|
| DEFAULT, READONLY, SHARED | 
| Constructor Summary | |
|---|---|
| BeanList()Uses an ArrayList as the underlying List implementation. | |
| BeanList(BeanCollectionLoader loader,
         Object ownerBean,
         String propertyName)Used to create deferred fetch proxy. | |
| BeanList(List<E> list)Specify the underlying List implementation. | |
| Method Summary | ||
|---|---|---|
|  boolean | add(E o) | |
|  void | add(int index,
    E element) | |
|  boolean | addAll(Collection<? extends E> c) | |
|  boolean | addAll(int index,
       Collection<? extends E> c) | |
|  void | addBean(Object bean)Add a loaded bean to the collection. | |
|  boolean | checkEmptyLazyLoad()Check after the lazy load that the underlying collection is not null (handle case where join to many not outer). | |
|  void | clear() | |
|  boolean | contains(Object o) | |
|  boolean | containsAll(Collection<?> c) | |
|  boolean | equals(Object obj)Equal if obj is a List and equal in a list sense. | |
|  E | get(int index) | |
|  Object | getActualCollection()Returns the underlying list. | |
|  Collection<E> | getActualDetails()Returns the underlying details as an iterator. | |
|  List<E> | getActualList()Return the actual underlying list. | |
|  int | hashCode() | |
|  int | indexOf(Object o) | |
|  void | internalAdd(Object bean)Add the bean to the collection. | |
|  boolean | isEmpty()Return true if the List Set or Map is empty. | |
|  boolean | isPopulated()Return true if the underlying list is populated. | |
|  Iterator<E> | iterator() | |
|  int | lastIndexOf(Object o) | |
|  ListIterator<E> | listIterator() | |
|  ListIterator<E> | listIterator(int index) | |
|  E | remove(int index) | |
|  boolean | remove(Object o) | |
|  boolean | removeAll(Collection<?> c) | |
|  boolean | retainAll(Collection<?> c) | |
|  E | set(int index,
    E element) | |
|  void | setActualList(List<?> list)Set the actual underlying list. | |
|  int | size()Return the number of elements in the List Set or Map. | |
|  List<E> | subList(int fromIndex,
        int toIndex) | |
|  Object[] | toArray() | |
| 
 | toArray(T[] a) | |
|  String | toString() | |
| Methods inherited from class com.avaje.ebean.common.AbstractBeanCollection | 
|---|
| backgroundFetchWait, backgroundFetchWait, getFilterMany, getLoaderIndex, getModifyAdditions, getModifyRemovals, getOwnerBean, getPropertyName, hasMoreRows, isFinishedFetch, isReadOnly, isSharedInstance, modifyAddition, modifyRemoval, modifyReset, setBackgroundFetch, setBeanCollectionTouched, setFilterMany, setFinishedFetch, setHasMoreRows, setLoader, setModifyListening, setReadOnly, setSharedInstance | 
| Methods inherited from class java.lang.Object | 
|---|
| getClass, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public BeanList(List<E> list)
public BeanList()
public BeanList(BeanCollectionLoader loader,
                Object ownerBean,
                String propertyName)
| Method Detail | 
|---|
public void addBean(Object bean)
BeanCollectionAdd
addBean in interface BeanCollectionAddpublic void internalAdd(Object bean)
BeanCollectionThis is disallowed for BeanMap.
internalAdd in interface BeanCollection<E>public boolean checkEmptyLazyLoad()
BeanCollectionThat is, if the collection was not loaded due to filterMany predicates etc then make sure the collection is set to empty.
checkEmptyLazyLoad in interface BeanCollection<E>public void setActualList(List<?> list)
This is primarily for the deferred fetching function.
public List<E> getActualList()
public Collection<E> getActualDetails()
BeanCollectionNote that for maps this returns the entrySet as we need the keys of the map.
getActualDetails in interface BeanCollection<E>public Object getActualCollection()
getActualCollection in interface BeanCollection<E>public boolean isPopulated()
isPopulated in interface BeanCollection<E>public String toString()
toString in class Objectpublic boolean equals(Object obj)
Specifically obj does not need to be a BeanList but any list. This does not use the FindMany, fetchedMaxRows or finishedFetch properties in the equals test.
equals in interface Collection<E>equals in interface List<E>equals in class Objectpublic int hashCode()
hashCode in interface Collection<E>hashCode in interface List<E>hashCode in class Object
public void add(int index,
                E element)
add in interface List<E>public boolean add(E o)
add in interface Collection<E>add in interface List<E>public boolean addAll(Collection<? extends E> c)
addAll in interface Collection<E>addAll in interface List<E>
public boolean addAll(int index,
                      Collection<? extends E> c)
addAll in interface List<E>public void clear()
clear in interface Collection<E>clear in interface List<E>public boolean contains(Object o)
contains in interface Collection<E>contains in interface List<E>public boolean containsAll(Collection<?> c)
containsAll in interface Collection<E>containsAll in interface List<E>public E get(int index)
get in interface List<E>public int indexOf(Object o)
indexOf in interface List<E>public boolean isEmpty()
BeanCollection
isEmpty in interface BeanCollection<E>isEmpty in interface Collection<E>isEmpty in interface List<E>public Iterator<E> iterator()
iterator in interface Iterable<E>iterator in interface Collection<E>iterator in interface List<E>public int lastIndexOf(Object o)
lastIndexOf in interface List<E>public ListIterator<E> listIterator()
listIterator in interface List<E>public ListIterator<E> listIterator(int index)
listIterator in interface List<E>public E remove(int index)
remove in interface List<E>public boolean remove(Object o)
remove in interface Collection<E>remove in interface List<E>public boolean removeAll(Collection<?> c)
removeAll in interface Collection<E>removeAll in interface List<E>public boolean retainAll(Collection<?> c)
retainAll in interface Collection<E>retainAll in interface List<E>
public E set(int index,
             E element)
set in interface List<E>public int size()
BeanCollection
size in interface BeanCollection<E>size in interface Collection<E>size in interface List<E>
public List<E> subList(int fromIndex,
                       int toIndex)
subList in interface List<E>public Object[] toArray()
toArray in interface Collection<E>toArray in interface List<E>public <T> T[] toArray(T[] a)
toArray in interface Collection<E>toArray in interface List<E>| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||