|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.avaje.ebean.common.AbstractBeanCollection<E> com.avaje.ebean.common.BeanSet<E>
public final class BeanSet<E>
Set 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 | |
---|---|
BeanSet()
Create using an underlying LinkedHashSet. |
|
BeanSet(BeanCollectionLoader loader,
Object ownerBean,
String propertyName)
|
|
BeanSet(Set<E> set)
Create with a specific Set implementation. |
Method Summary | ||
---|---|---|
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 details as an iterator. |
|
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. |
|
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()
|
|
|
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 BeanSet(Set<E> set)
public BeanSet()
public BeanSet(BeanCollectionLoader loader, Object ownerBean, String propertyName)
Method Detail |
---|
public void addBean(Object bean)
BeanCollectionAdd
addBean
in interface BeanCollectionAdd
public void internalAdd(Object bean)
BeanCollection
This is disallowed for BeanMap.
internalAdd
in interface BeanCollection<E>
public boolean isPopulated()
isPopulated
in interface BeanCollection<E>
public boolean checkEmptyLazyLoad()
BeanCollection
That 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 Set<E> getActualSet()
public Collection<E> getActualDetails()
BeanCollection
Note 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 String toString()
toString
in class Object
public boolean equals(Object obj)
equals
in interface Collection<E>
equals
in interface Set<E>
equals
in class Object
public int hashCode()
hashCode
in interface Collection<E>
hashCode
in interface Set<E>
hashCode
in class Object
public boolean add(E o)
add
in interface Collection<E>
add
in interface Set<E>
public boolean addAll(Collection<? extends E> c)
addAll
in interface Collection<E>
addAll
in interface Set<E>
public void clear()
clear
in interface Collection<E>
clear
in interface Set<E>
public boolean contains(Object o)
contains
in interface Collection<E>
contains
in interface Set<E>
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<E>
containsAll
in interface Set<E>
public boolean isEmpty()
BeanCollection
isEmpty
in interface BeanCollection<E>
isEmpty
in interface Collection<E>
isEmpty
in interface Set<E>
public Iterator<E> iterator()
iterator
in interface Iterable<E>
iterator
in interface Collection<E>
iterator
in interface Set<E>
public boolean remove(Object o)
remove
in interface Collection<E>
remove
in interface Set<E>
public boolean removeAll(Collection<?> c)
removeAll
in interface Collection<E>
removeAll
in interface Set<E>
public boolean retainAll(Collection<?> c)
retainAll
in interface Collection<E>
retainAll
in interface Set<E>
public int size()
BeanCollection
size
in interface BeanCollection<E>
size
in interface Collection<E>
size
in interface Set<E>
public Object[] toArray()
toArray
in interface Collection<E>
toArray
in interface Set<E>
public <T> T[] toArray(T[] a)
toArray
in interface Collection<E>
toArray
in interface Set<E>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |