org.granite.client.persistence.collection
Class AbstractPersistentCollection<C>
java.lang.Object
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
AbstractPersistentCollection
protected AbstractPersistentCollection()
init
protected void init(C collection,
String detachedState,
boolean dirty)
getLoader
public Loader<PersistentCollection> getLoader()
- Specified by:
getLoader in interface PersistentCollection
setLoader
public void setLoader(Loader<PersistentCollection> loader)
- Specified by:
setLoader in interface PersistentCollection
checkInitializedRead
protected boolean checkInitializedRead()
checkInitializedWrite
protected void checkInitializedWrite()
getCollection
protected C getCollection()
getDetachedState
public String getDetachedState()
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
clone
public PersistentCollection clone(boolean uninitialize)
- Specified by:
clone in interface PersistentCollection
createSnapshot
protected abstract PersistentCollectionSnapshot createSnapshot(Object io,
boolean forReading)
updateFromSnapshot
protected abstract void updateFromSnapshot(ObjectInput in,
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
toString
public String toString()
- Overrides:
toString in class Object
addListener
public void addListener(PersistentCollection.ChangeListener listener)
- Specified by:
addListener in interface PersistentCollection
removeListener
public void removeListener(PersistentCollection.ChangeListener listener)
- Specified by:
removeListener in interface PersistentCollection
addListener
public void addListener(PersistentCollection.InitializationListener listener)
- Specified by:
addListener in interface PersistentCollection
removeListener
public void removeListener(PersistentCollection.InitializationListener listener)
- Specified by:
removeListener in interface PersistentCollection
initializing
public void initializing()
- Specified by:
initializing in interface PersistentCollection
initialize
public void initialize()
- Specified by:
initialize in interface PersistentCollection
doInitialize
protected abstract void doInitialize()
uninitialize
public void uninitialize()
- Specified by:
uninitialize in interface PersistentCollection
withInitialized
public void withInitialized(PersistentCollection.InitializationCallback callback)
- Specified by:
withInitialized in interface PersistentCollection