public final class BeanList<E> extends AbstractBeanCollection<E> implements List<E>, BeanCollectionAdd
BeanCollection.ModifyListenModebeanCollectionTouched, ebeanServerName, fetchFuture, filterMany, finishedFetch, hasMoreRows, loader, loaderIndex, modifyAddListening, modifyHolder, modifyListening, modifyListenMode, modifyRemoveListening, ownerBean, propertyName, readOnly| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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 collection of beans from the Set, Map or List.
|
Collection<?> |
getActualEntries()
Returns the underlying entries so for Maps this is a collection of
Map.Entry.
|
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.
|
boolean |
isReference()
Return true if this is a reference (lazy loading) bean collection.
|
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() |
<T> T[] |
toArray(T[] a) |
String |
toString() |
backgroundFetchWait, backgroundFetchWait, checkReadOnly, getFilterMany, getLoaderIndex, getModifyAdditions, getModifyHolder, getModifyListenMode, getModifyRemovals, getOwnerBean, getPropertyName, hasMoreRows, isFinishedFetch, isReadOnly, lazyLoadCollection, modifyAddition, modifyRemoval, modifyReset, setBackgroundFetch, setBeanCollectionTouched, setFilterMany, setFinishedFetch, setHasMoreRows, setLoader, setModifyListening, setReadOnly, touchedpublic BeanList()
public BeanList(BeanCollectionLoader loader, Object ownerBean, String propertyName)
public void addBean(Object bean)
BeanCollectionAddaddBean 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 Collection<E> getActualDetails()
BeanCollectiongetActualDetails in interface BeanCollection<E>public Collection<?> getActualEntries()
BeanCollectionFor maps this returns the entrySet as we need the keys of the map.
getActualEntries in interface BeanCollection<E>public Object getActualCollection()
getActualCollection in interface BeanCollection<E>public boolean isPopulated()
isPopulated in interface BeanCollection<E>public boolean isReference()
isReference in interface BeanCollection<E>public 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.
public int hashCode()
public boolean add(E o)
public boolean addAll(Collection<? extends E> c)
public boolean addAll(int index,
Collection<? extends E> c)
public void clear()
public boolean contains(Object o)
public boolean containsAll(Collection<?> c)
containsAll in interface Collection<E>containsAll in interface List<E>public boolean isEmpty()
BeanCollectionisEmpty in interface BeanCollection<E>isEmpty in interface Collection<E>isEmpty 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 boolean remove(Object o)
public boolean removeAll(Collection<?> c)
public boolean retainAll(Collection<?> c)
public int size()
BeanCollectionsize in interface BeanCollection<E>size in interface Collection<E>size in interface List<E>public Object[] toArray()
Copyright © 2014. All Rights Reserved.