org.granite.client.persistence.collection
Class AbstractPersistentCollection<C>

java.lang.Object
  extended by org.granite.client.persistence.collection.AbstractPersistentCollection<C>
All Implemented Interfaces:
Externalizable, Serializable, PersistentCollection
Direct Known Subclasses:
AbstractPersistentMapCollection, AbstractPersistentSimpleCollection

public abstract class AbstractPersistentCollection<C>
extends Object
implements PersistentCollection

Author:
Franck WOLFF
See Also:
Serialized Form

Constructor Summary
protected AbstractPersistentCollection()
           
 
Method Summary
protected  void checkInitialized()
           
 void clearDirty()
           
protected abstract  org.granite.messaging.persistence.PersistentCollectionSnapshot createSnapshot(boolean forReading)
           
 void dirty()
           
protected  ClassLoader getClassLoader()
           
protected  C getCollection()
           
protected  void init(C collection, boolean dirty)
           
 boolean isDirty()
           
 void readExternal(ObjectInput in)
           
protected abstract  void updateFromSnapshot(ObjectInput in, org.granite.messaging.persistence.PersistentCollectionSnapshot snapshot)
           
 boolean wasInitialized()
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPersistentCollection

protected AbstractPersistentCollection()
Method Detail

init

protected void init(C collection,
                    boolean dirty)

checkInitialized

protected void checkInitialized()

getCollection

protected C getCollection()

getClassLoader

protected ClassLoader getClassLoader()

wasInitialized

public boolean wasInitialized()
Specified by:
wasInitialized in interface PersistentCollection

isDirty

public boolean isDirty()
Specified by:
isDirty in interface PersistentCollection

dirty

public void dirty()
Specified by:
dirty in interface PersistentCollection

clearDirty

public void clearDirty()
Specified by:
clearDirty in interface PersistentCollection

createSnapshot

protected abstract org.granite.messaging.persistence.PersistentCollectionSnapshot createSnapshot(boolean forReading)

updateFromSnapshot

protected abstract void updateFromSnapshot(ObjectInput in,
                                           org.granite.messaging.persistence.PersistentCollectionSnapshot snapshot)

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException