org.granite.client.tide.collections.javafx
Class AbstractJavaFXManagedPersistentAssociation

java.lang.Object
  extended by org.granite.client.tide.collections.javafx.AbstractJavaFXManagedPersistentAssociation
All Implemented Interfaces:
LazyableCollection, ManagedPersistentAssociation, Wrapper, PropertyHolder
Direct Known Subclasses:
JavaFXManagedPersistentCollection, JavaFXManagedPersistentMap

public abstract class AbstractJavaFXManagedPersistentAssociation
extends Object
implements ManagedPersistentAssociation, PropertyHolder, Wrapper

Internal implementation of persistent collection handling automatic lazy loading.
Used for wrapping persistent collections received from the server.
Should not be used directly.

Author:
William DRAI

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.granite.client.tide.collections.ManagedPersistentAssociation
ManagedPersistentAssociation.InitializationCallback, ManagedPersistentAssociation.InitializationListener
 
Constructor Summary
protected AbstractJavaFXManagedPersistentAssociation(Identifiable entity, String propertyName)
           
 
Method Summary
 void addListener(ManagedPersistentAssociation.InitializationListener listener)
           
protected  boolean checkForRead()
           
protected  boolean checkForRead(boolean requestInitialization)
           
protected  void checkForWrite()
           
 boolean equals(Object obj)
           
 Identifiable getOwner()
           
 String getPropertyName()
           
 ServerSession getServerSession()
           
 Object getWrappedObject()
           
 int hashCode()
           
 void initialize()
           
 void initializing()
           
 boolean isInitialized()
           
 boolean isInitializing()
           
 void propertyResultHandler(String propName, ResultEvent event)
           
 void removeListener(ManagedPersistentAssociation.InitializationListener listener)
           
 void setProperty(String propertyName, Object value)
           
 void setServerSession(ServerSession serverSession)
           
 String toString()
           
 void uninitialize()
           
 void withInitialized(ManagedPersistentAssociation.InitializationCallback callback)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.granite.client.tide.collections.ManagedPersistentAssociation
getCollection
 
Methods inherited from interface org.granite.client.persistence.LazyableCollection
clone
 
Methods inherited from interface org.granite.client.tide.PropertyHolder
getObject
 

Constructor Detail

AbstractJavaFXManagedPersistentAssociation

protected AbstractJavaFXManagedPersistentAssociation(Identifiable entity,
                                                     String propertyName)
Method Detail

getOwner

public Identifiable getOwner()
Specified by:
getOwner in interface ManagedPersistentAssociation

getPropertyName

public String getPropertyName()
Specified by:
getPropertyName in interface ManagedPersistentAssociation

setServerSession

public void setServerSession(ServerSession serverSession)
Specified by:
setServerSession in interface ManagedPersistentAssociation

getServerSession

public ServerSession getServerSession()

getWrappedObject

public Object getWrappedObject()
Specified by:
getWrappedObject in interface Wrapper

propertyResultHandler

public void propertyResultHandler(String propName,
                                  ResultEvent event)

setProperty

public void setProperty(String propertyName,
                        Object value)
Specified by:
setProperty in interface PropertyHolder

isInitialized

public boolean isInitialized()
Specified by:
isInitialized in interface LazyableCollection

isInitializing

public boolean isInitializing()

initializing

public void initializing()
Specified by:
initializing in interface LazyableCollection

addListener

public void addListener(ManagedPersistentAssociation.InitializationListener listener)
Specified by:
addListener in interface ManagedPersistentAssociation

removeListener

public void removeListener(ManagedPersistentAssociation.InitializationListener listener)

checkForRead

protected boolean checkForRead()

checkForRead

protected boolean checkForRead(boolean requestInitialization)

checkForWrite

protected void checkForWrite()

initialize

public void initialize()
Specified by:
initialize in interface LazyableCollection

uninitialize

public void uninitialize()
Specified by:
uninitialize in interface LazyableCollection

withInitialized

public void withInitialized(ManagedPersistentAssociation.InitializationCallback callback)
Specified by:
withInitialized in interface ManagedPersistentAssociation

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object