|
||||||||||
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.BeanMap<K,E>
public final class BeanMap<K,E>
Map capable of lazy loading.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
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 | |
---|---|
BeanMap() Create using a underlying LinkedHashMap. |
|
BeanMap(BeanCollectionLoader ebeanServer, Object ownerBean, String propertyName) |
|
BeanMap(Map<K,E> map) Create with a given Map. |
Method Summary | |
---|---|
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 |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<K,E>> |
entrySet() |
boolean |
equals(Object obj) Equal if obj is a Map and equal in a Map sense. |
E |
get(Object key) |
Object |
getActualCollection() Returns the underlying map. |
Collection<E> |
getActualDetails() Returns the map entrySet iterator. |
Map<K,E> |
getActualMap() Return the actual underlying map. |
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() Return true if the underlying map has been populated. |
Set<K> |
keySet() |
E |
put(K key, E value) |
void |
putAll(Map<? extends K,? extends E> t) |
E |
remove(Object key) |
void |
setActualMap(Map<?,?> map) Set the actual underlying map. |
int |
size() Return the number of elements in the List Set or Map. |
String |
toString() |
Collection<E> |
values() |
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 BeanMap(Map<K,E> map)
public BeanMap()
public BeanMap(BeanCollectionLoader ebeanServer, Object ownerBean, String propertyName)
Method Detail |
---|
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 setActualMap(Map<?,?> map)
public Map<K,E> getActualMap()
public Collection<E> getActualDetails()
This is because the key values may need to be set against the details (so they don't need to be set twice).
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 Map<K,E>
equals
in class Object
public int hashCode()
hashCode
in interface Map<K,E>
hashCode
in class Object
public void clear()
clear
in interface Map<K,E>
public boolean containsKey(Object key)
containsKey
in interface Map<K,E>
public boolean containsValue(Object value)
containsValue
in interface Map<K,E>
public Set<Map.Entry<K,E>> entrySet()
entrySet
in interface Map<K,E>
public E get(Object key)
get
in interface Map<K,E>
public boolean isEmpty()
BeanCollection
isEmpty
in interface BeanCollection<E>
isEmpty
in interface Map<K,E>
public Set<K> keySet()
keySet
in interface Map<K,E>
public E put(K key, E value)
put
in interface Map<K,E>
public void putAll(Map<? extends K,? extends E> t)
putAll
in interface Map<K,E>
public E remove(Object key)
remove
in interface Map<K,E>
public int size()
BeanCollection
size
in interface BeanCollection<E>
size
in interface Map<K,E>
public Collection<E> values()
values
in interface Map<K,E>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |