public final class BeanMap<K,E> extends AbstractBeanCollection<E> implements Map<K,E>
BeanCollection.ModifyListenModebeanCollectionTouched, ebeanServerName, filterMany, loader, modifyAddListening, modifyHolder, modifyListening, modifyListenMode, modifyRemoveListening, ownerBean, propertyName, readOnly, registeredWithLoadContext, touched| Constructor and Description |
|---|
BeanMap()
Create using a underlying LinkedHashMap.
|
BeanMap(BeanCollectionLoader ebeanServer,
EntityBean ownerBean,
String propertyName) |
BeanMap(Map<K,E> map)
Create with a given Map.
|
| Modifier and Type | Method and Description |
|---|---|
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) |
Collection<E> |
getActualDetails()
Returns the collection of beans (map values).
|
Collection<?> |
getActualEntries()
Returns the map entrySet.
|
Map<K,E> |
getActualMap()
Return the actual underlying map.
|
int |
hashCode() |
void |
internalAdd(Object bean)
Add the bean to the collection.
|
void |
internalPut(Object key,
Object bean) |
void |
internalPutNull() |
boolean |
isEmpty()
Return true if the List Set or Map is empty.
|
boolean |
isEmptyAndUntouched()
Return true if the collection is empty and untouched.
|
boolean |
isPopulated()
Return true if the underlying map has been populated.
|
boolean |
isReference()
Return true if this is a reference (lazy loading) bean collection.
|
Set<K> |
keySet() |
E |
put(K key,
E value) |
void |
putAll(Map<? extends K,? extends E> puts) |
E |
remove(Object key) |
void |
reset(EntityBean ownerBean,
String propertyName)
Reset the collection back to an empty state ready for reloading.
|
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() |
checkReadOnly, getFilterMany, getModifyAdditions, getModifyHolder, getModifyListenMode, getModifyRemovals, getOwnerBean, getPropertyName, isReadOnly, isRegisteredWithLoadContext, lazyLoadCollection, modifyAddition, modifyRemoval, modifyReset, setBeanCollectionTouched, setFilterMany, setLoader, setModifyListening, setReadOnly, touchedclone, finalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic BeanMap()
public BeanMap(BeanCollectionLoader ebeanServer, EntityBean ownerBean, String propertyName)
public void reset(EntityBean ownerBean, String propertyName)
BeanCollectionThis is done as part of bean refresh.
reset in interface BeanCollection<E>public boolean isEmptyAndUntouched()
BeanCollectionisEmptyAndUntouched in interface BeanCollection<E>public void internalPutNull()
public void internalPut(Object key, Object bean)
public 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 setActualMap(Map<?,?> map)
public Map<K,E> getActualMap()
public Collection<E> getActualDetails()
getActualDetails in interface BeanCollection<E>public Collection<?> getActualEntries()
This is because the key values may need to be set against the details (so they don't need to be set twice).
getActualEntries in interface BeanCollection<E>public int hashCode()
public boolean containsKey(Object key)
containsKey in interface Map<K,E>public boolean containsValue(Object value)
containsValue in interface Map<K,E>public boolean isEmpty()
BeanCollectionpublic int size()
BeanCollectionCopyright © 2015. All rights reserved.