X - The type the represented collection belongs toE - The element type of the represented collectionpublic class ManagedSet<X,E> extends ManagedCollection<E> implements Set<E>
| Constructor and Description |
|---|
ManagedSet() |
ManagedSet(PluralMappingEx<?,?,E> mapping,
ManagedInstance<?> managedInstance,
boolean lazy)
Constructor for lazy initialization.
|
ManagedSet(PluralMappingEx<?,?,E> mapping,
ManagedInstance<?> managedInstance,
Collection<? extends E> values)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E e) |
boolean |
addAll(Collection<? extends E> c) |
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 |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
boolean |
equals(Object obj) |
void |
flush(Connection connection,
boolean removals,
boolean force)
Flushes the collection
|
Set<E> |
getDelegate()
Returns the delegate collection.
|
protected Collection<E> |
getSnapshot()
Return the items that are added.
|
int |
hashCode() |
void |
initialize()
Initializes the managed collection.
|
boolean |
isEmpty() |
boolean |
isInitialized()
Returns if the list is initialized.
|
Iterator<E> |
iterator() |
void |
refreshChildren()
Refreshes the children of the managed collection.
|
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
protected void |
removeChild(E child)
Removes the child from the managed list without initialize checks.
|
boolean |
retainAll(Collection<?> c) |
int |
size() |
protected void |
snapshot()
Makes a snapshot of the collection
|
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
String |
toString() |
changed, getInsertBatchSize, getManagedInstance, getMapping, mergeWith, persistAdditions, removed, removeOrphans, resetpublic ManagedSet()
public ManagedSet(PluralMappingEx<?,?,E> mapping, ManagedInstance<?> managedInstance, boolean lazy)
mapping - the mappingmanagedInstance - the managed instancelazy - if the collection is lazypublic ManagedSet(PluralMappingEx<?,?,E> mapping, ManagedInstance<?> managedInstance, Collection<? extends E> values)
mapping - the mappingmanagedInstance - the managed instancevalues - the initial valuespublic boolean add(E e)
public boolean addAll(Collection<? extends E> c)
public boolean addChild(EntryImpl<Object,ManagedInstance<?>> child)
addChild in class ManagedCollection<E>child - the child to addpublic boolean addElement(EntryImpl<Object,?> child)
addElement in class ManagedCollection<E>child - the child to addpublic void clear()
public boolean contains(Object o)
public boolean containsAll(Collection<?> c)
containsAll in interface Collection<E>containsAll in interface Set<E>public boolean equals(Object obj)
public void flush(Connection connection, boolean removals, boolean force) throws SQLException
flush in class ManagedCollection<E>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 Set<E> getDelegate()
getDelegate in class ManagedCollection<E>protected Collection<E> getSnapshot()
getSnapshot in class ManagedCollection<E>public int hashCode()
public void initialize()
initialize in class ManagedCollection<E>public boolean isEmpty()
public boolean isInitialized()
isInitialized in class ManagedCollection<E>public void refreshChildren()
refreshChildren in class ManagedCollection<E>public boolean remove(Object o)
public boolean removeAll(Collection<?> c)
protected void removeChild(E child)
removeChild in class ManagedCollection<E>child - the child to addpublic boolean retainAll(Collection<?> c)
public int size()
protected void snapshot()
snapshot in class ManagedCollection<E>public Object[] toArray()
public <T> T[] toArray(T[] a)
Copyright © 2012 Batoo Software & Consultancy. All Rights Reserved.