X - The type the represented collection belongs toE - The element type of the represented collectionpublic class ManagedList<X,E> extends ManagedCollection<E> implements List<E>
| Constructor and Description |
|---|
ManagedList() |
ManagedList(PluralMapping<?,?,E> mapping,
ManagedInstance<?> managedInstance,
boolean lazy)
Constructor for lazy initialization.
|
ManagedList(PluralMapping<?,?,E> mapping,
ManagedInstance<?> managedInstance,
Collection<? extends E> values)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E e) |
void |
add(int index,
E element) |
boolean |
addAll(Collection<? extends E> c) |
boolean |
addAll(int index,
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
|
E |
get(int index) |
ArrayList<E> |
getDelegate()
Returns the delegate collection.
|
protected Collection<E> |
getSnapshot()
Return the items that are added.
|
int |
hashCode() |
int |
indexOf(Object o) |
void |
initialize()
Initializes the managed collection.
|
boolean |
isEmpty() |
boolean |
isInitialized()
Returns if the list is initialized.
|
Iterator<E> |
iterator() |
int |
lastIndexOf(Object o) |
ListIterator<E> |
listIterator() |
ListIterator<E> |
listIterator(int index) |
void |
refreshChildren()
Refreshes the children of the managed collection.
|
E |
remove(int index) |
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) |
E |
set(int index,
E element) |
int |
size() |
protected void |
snapshot()
Makes a snapshot of the collection
|
List<E> |
subList(int fromIndex,
int toIndex) |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
String |
toString() |
changed, getInsertBatchSize, getManagedInstance, getMapping, mergeWith, persistAdditions, removed, removeOrphans, resetpublic ManagedList()
public ManagedList(PluralMapping<?,?,E> mapping, ManagedInstance<?> managedInstance, boolean lazy)
mapping - the mappingmanagedInstance - the managed instancelazy - if the collection is lazypublic ManagedList(PluralMapping<?,?,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 addAll(int index,
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 List<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 ArrayList<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 int lastIndexOf(Object o)
lastIndexOf in interface List<E>public ListIterator<E> listIterator()
listIterator in interface List<E>public ListIterator<E> listIterator(int index)
listIterator in interface List<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.