X - The type the represented collection belongs toK - The key type of the represented mapV - The value type of the represented mappublic class ManagedMap<X,K,V> extends ManagedCollection<V> implements Map<K,V>
| Constructor and Description |
|---|
ManagedMap() |
ManagedMap(PluralMapping<?,?,V> mapping,
ManagedInstance<?> managedInstance,
boolean lazy)
Constructor for lazy initialization.
|
ManagedMap(PluralMapping<?,?,V> mapping,
ManagedInstance<?> managedInstance,
Map<? extends K,? extends V> values)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addChild(EntryImpl<Object,ManagedInstance<?>> child)
Adds the child to the managed list without initialize checks.
|
boolean |
addElement(EntryImpl<Object,?> child)
Adds the child to the managed list without initialize checks.
|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<K,V>> |
entrySet() |
void |
flush(Connection connection,
boolean removals,
boolean force)
Flushes the collection
|
V |
get(Object key) |
Collection<V> |
getDelegate()
Returns the delegate collection.
|
protected Collection<V> |
getSnapshot()
Return the items that are added.
|
void |
initialize()
Initializes the managed collection.
|
boolean |
isEmpty() |
boolean |
isInitialized()
Returns if the list is initialized.
|
Set<K> |
keySet() |
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> m) |
void |
refreshChildren()
Refreshes the children of the managed collection.
|
V |
remove(Object key) |
protected void |
removeChild(V child)
Removes the child from the managed list without initialize checks.
|
int |
size() |
protected void |
snapshot()
Makes a snapshot of the collection
|
String |
toString() |
Collection<V> |
values() |
changed, getInsertBatchSize, getManagedInstance, getMapping, mergeWith, persistAdditions, removed, removeOrphans, resetpublic ManagedMap()
public ManagedMap(PluralMapping<?,?,V> mapping, ManagedInstance<?> managedInstance, boolean lazy)
mapping - the mappingmanagedInstance - the managed instancelazy - if the collection is lazypublic ManagedMap(PluralMapping<?,?,V> mapping, ManagedInstance<?> managedInstance, Map<? extends K,? extends V> values)
mapping - the mappingmanagedInstance - the managed instancevalues - the initial valuespublic boolean addChild(EntryImpl<Object,ManagedInstance<?>> child)
addChild in class ManagedCollection<V>child - the child to addpublic boolean addElement(EntryImpl<Object,?> child)
addElement in class ManagedCollection<V>child - the child to addpublic boolean containsKey(Object key)
containsKey in interface Map<K,V>public boolean containsValue(Object value)
containsValue in interface Map<K,V>public void flush(Connection connection, boolean removals, boolean force) throws SQLException
flush in class ManagedCollection<V>connection - the connectionremovals - true if the removals should be flushed and false for the additionsforce - true to force, effective only for insertions and for new entities.SQLException - thrown in case of an SQL errorpublic Collection<V> getDelegate()
getDelegate in class ManagedCollection<V>protected Collection<V> getSnapshot()
getSnapshot in class ManagedCollection<V>public void initialize()
initialize in class ManagedCollection<V>public boolean isInitialized()
isInitialized in class ManagedCollection<V>public void refreshChildren()
refreshChildren in class ManagedCollection<V>protected void removeChild(V child)
removeChild in class ManagedCollection<V>child - the child to addprotected void snapshot()
snapshot in class ManagedCollection<V>Copyright © 2012 Batoo Software & Consultancy. All Rights Reserved.