|
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 Listpublic boolean add(Object o)
add in interface Listpublic boolean addAll(Collection c)
addAll in interface List
public boolean addAll(int index,
Collection c)
addAll in interface Listpublic void clear()
clear in interface Listpublic boolean contains(Object o)
contains in interface Listpublic boolean containsAll(Collection c)
containsAll in interface Listpublic Object get(int index)
get in interface Listpublic int indexOf(Object o)
indexOf in interface Listpublic boolean isEmpty()
isEmpty in interface Listpublic Iterator iterator()
iterator in interface Listpublic int lastIndexOf(Object o)
lastIndexOf in interface Listpublic ListIterator listIterator()
listIterator in interface Listpublic ListIterator listIterator(int index)
listIterator in interface Listpublic Object remove(int index)
remove in interface Listpublic boolean remove(Object o)
remove in interface Listpublic boolean removeAll(Collection c)
removeAll in interface Listpublic boolean retainAll(Collection c)
retainAll in interface List
public Object set(int index,
Object element)
set in interface Listpublic int size()
size in interface List
public List subList(int fromIndex,
int toIndex)
subList in interface Listpublic Object[] toArray()
toArray in interface Listpublic 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 | |||||||||