org.granite.client.persistence.collection
Class PersistentList<E>

java.lang.Object
  extended by org.granite.client.persistence.collection.AbstractPersistentCollection<C>
      extended by org.granite.client.persistence.collection.AbstractPersistentSimpleCollection<E,List<E>>
          extended by org.granite.client.persistence.collection.PersistentList<E>
All Implemented Interfaces:
Externalizable, Serializable, Iterable<E>, Collection<E>, List<E>, PersistentCollection
Direct Known Subclasses:
PersistentBag

public class PersistentList<E>
extends AbstractPersistentSimpleCollection<E,List<E>>
implements List<E>

Author:
Franck WOLFF
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.granite.client.persistence.collection.PersistentCollection
PersistentCollection.ChangeListener, PersistentCollection.InitializationCallback, PersistentCollection.InitializationListener
 
Constructor Summary
PersistentList()
           
PersistentList(boolean initialized)
           
PersistentList(List<E> collection)
           
PersistentList(List<E> collection, boolean clone)
           
 
Method Summary
 void add(int index, E element)
           
 boolean addAll(int index, Collection<? extends E> c)
           
 PersistentList<E> clone(boolean uninitialize)
           
 void doInitialize()
           
 E get(int index)
           
 int indexOf(Object o)
           
 int lastIndexOf(Object o)
           
 ListIterator<E> listIterator()
           
 ListIterator<E> listIterator(int index)
           
 E remove(int index)
           
 E set(int index, E element)
           
 List<E> subList(int fromIndex, int toIndex)
           
protected  void updateFromSnapshot(ObjectInput in, PersistentCollectionSnapshot snapshot)
           
 
Methods inherited from class org.granite.client.persistence.collection.AbstractPersistentSimpleCollection
add, addAll, clear, contains, containsAll, createSnapshot, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from class org.granite.client.persistence.collection.AbstractPersistentCollection
addListener, addListener, checkInitializedRead, checkInitializedWrite, clearDirty, dirty, getClassLoader, getCollection, getDetachedState, getLoader, init, initialize, initializing, isDirty, readExternal, removeListener, removeListener, setLoader, toString, uninitialize, wasInitialized, withInitialized, writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Constructor Detail

PersistentList

public PersistentList()

PersistentList

public PersistentList(boolean initialized)

PersistentList

public PersistentList(List<E> collection)

PersistentList

public PersistentList(List<E> collection,
                      boolean clone)
Method Detail

doInitialize

public void doInitialize()
Specified by:
doInitialize in class AbstractPersistentCollection<List<E>>

addAll

public boolean addAll(int index,
                      Collection<? extends E> c)
Specified by:
addAll in interface List<E>

get

public E get(int index)
Specified by:
get in interface List<E>

set

public E set(int index,
             E element)
Specified by:
set in interface List<E>

add

public void add(int index,
                E element)
Specified by:
add in interface List<E>

remove

public E remove(int index)
Specified by:
remove in interface List<E>

indexOf

public int indexOf(Object o)
Specified by:
indexOf in interface List<E>

lastIndexOf

public int lastIndexOf(Object o)
Specified by:
lastIndexOf in interface List<E>

listIterator

public ListIterator<E> listIterator()
Specified by:
listIterator in interface List<E>

listIterator

public ListIterator<E> listIterator(int index)
Specified by:
listIterator in interface List<E>

subList

public List<E> subList(int fromIndex,
                       int toIndex)
Specified by:
subList in interface List<E>

updateFromSnapshot

protected void updateFromSnapshot(ObjectInput in,
                                  PersistentCollectionSnapshot snapshot)
Specified by:
updateFromSnapshot in class AbstractPersistentCollection<List<E>>

clone

public PersistentList<E> clone(boolean uninitialize)
Specified by:
clone in interface PersistentCollection
Overrides:
clone in class AbstractPersistentCollection<List<E>>