|
Arch4J 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.arch4j.persistence.domainmapper.PersistableList
This class implements the List
interface in order to manage the
persistent state of its contained items. Besides the main list of objects retrieved
from a database, it maintains a list of objects that have been added and a list of
objects that have been removed from the main list since the last reset was performed.
Reset is typically called when the list is synchronized with the database.
Constructor Summary | |
|
PersistableList()
Constructs an empty persistable list. |
|
PersistableList(Collection c)
Constructs a list containing the elements of the specified collection. |
protected |
PersistableList(List mainList,
List addedList,
List removedList)
Protected constructor used to initialize the receiver. |
Method Summary | |
void |
add(int index,
Object element)
|
boolean |
add(Object o)
|
boolean |
addAll(Collection c)
|
boolean |
addAll(int index,
Collection c)
|
void |
clear()
|
boolean |
contains(Object o)
|
boolean |
containsAll(Collection c)
|
Object |
get(int index)
|
List |
getAddedList()
Retrieves the list of objects added since the last reset. |
List |
getMainList()
Retrieves the main, current list of objects managed by the receiver. |
List |
getPreExistingList()
Retrieves a new list of objects from the main list that do not exist in the added list. |
List |
getRemovedList()
Retrieves the list of objects removed sinces the last reset. |
int |
indexOf(Object o)
|
boolean |
isEmpty()
|
Iterator |
iterator()
|
int |
lastIndexOf(Object o)
|
ListIterator |
listIterator()
|
ListIterator |
listIterator(int index)
|
Object |
remove(int index)
|
boolean |
remove(Object o)
|
boolean |
removeAll(Collection c)
|
void |
reset()
Clears both the added and the removed lists. |
boolean |
retainAll(Collection c)
|
Object |
set(int index,
Object element)
|
int |
size()
|
List |
subList(int fromIndex,
int toIndex)
|
Object[] |
toArray()
|
Object[] |
toArray(Object[] a)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.List |
equals, hashCode |
Constructor Detail |
public PersistableList()
public PersistableList(Collection c)
c
- The collection whose elements are to be placed into the receiver.protected PersistableList(List mainList, List addedList, List removedList)
Method Detail |
public List getMainList()
public List getAddedList()
public List getRemovedList()
public List getPreExistingList()
public void reset()
public void add(int index, Object element)
add
in interface List
public boolean add(Object o)
add
in interface List
public boolean addAll(Collection c)
addAll
in interface List
public boolean addAll(int index, Collection c)
addAll
in interface List
public void clear()
clear
in interface List
public boolean contains(Object o)
contains
in interface List
public boolean containsAll(Collection c)
containsAll
in interface List
public Object get(int index)
get
in interface List
public int indexOf(Object o)
indexOf
in interface List
public boolean isEmpty()
isEmpty
in interface List
public Iterator iterator()
iterator
in interface List
public int lastIndexOf(Object o)
lastIndexOf
in interface List
public ListIterator listIterator()
listIterator
in interface List
public ListIterator listIterator(int index)
listIterator
in interface List
public Object remove(int index)
remove
in interface List
public boolean remove(Object o)
remove
in interface List
public boolean removeAll(Collection c)
removeAll
in interface List
public boolean retainAll(Collection c)
retainAll
in interface List
public Object set(int index, Object element)
set
in interface List
public int size()
size
in interface List
public List subList(int fromIndex, int toIndex)
subList
in interface List
public Object[] toArray()
toArray
in interface List
public Object[] toArray(Object[] a)
toArray
in interface List
|
Arch4J 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |