public final class BeanSet<E> extends AbstractBeanCollection<E> implements Set<E>, BeanCollectionAdd
BeanCollection.ModifyListenModebeanCollectionTouched, ebeanServerName, fetchFuture, filterMany, finishedFetch, hasMoreRows, loader, loaderIndex, modifyAddListening, modifyHolder, modifyListening, modifyListenMode, modifyRemoveListening, ownerBean, propertyName, readOnly| Constructor and Description |
|---|
BeanSet()
Create using an underlying LinkedHashSet.
|
BeanSet(BeanCollectionLoader loader,
Object ownerBean,
String propertyName) |
BeanSet(Set<E> set)
Create with a specific Set implementation.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E o) |
boolean |
addAll(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 Set and equal in a Set sense.
|
Object |
getActualCollection()
Returns the underlying set.
|
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.
|
Set<E> |
getActualSet()
Return the actual underlying set.
|
int |
hashCode() |
void |
internalAdd(Object bean)
Add the bean to the collection.
|
boolean |
isEmpty()
Return true if the List Set or Map is empty.
|
boolean |
isPopulated()
Returns true if the underlying set has its data.
|
boolean |
isReference()
Return true if this is a reference (lazy loading) bean collection.
|
Iterator<E> |
iterator() |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
void |
setActualSet(Set<?> set)
Set the underlying set (used for lazy fetch).
|
int |
size()
Return the number of elements in the List Set or Map.
|
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 BeanSet()
public BeanSet(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 isPopulated()
isPopulated in interface BeanCollection<E>public boolean isReference()
isReference 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 setActualSet(Set<?> set)
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 equals(Object obj)
public int hashCode()
public boolean add(E o)
public boolean addAll(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 Set<E>public boolean isEmpty()
BeanCollectionisEmpty in interface BeanCollection<E>isEmpty in interface Collection<E>isEmpty in interface Set<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 Set<E>public Object[] toArray()
Copyright © 2014. All Rights Reserved.