org.caleigo.core
Class ControlledProxyEntity

java.lang.Object
  extended byorg.caleigo.core.ProxyEntity
      extended byorg.caleigo.core.ControlledProxyEntity
All Implemented Interfaces:
java.lang.Comparable, IControlledProxy, IDataConsumer, IDataProvider, IDistributable, IEntity, IProxyController, IProxyEntity, java.io.Serializable

public class ControlledProxyEntity
extends ProxyEntity
implements IControlledProxy

Version:
1.00
Author:
Dennis Zikovic
See Also:
Serialized Form

Nested Class Summary
protected  class ControlledProxyEntity.ControllListener
           
 
Nested classes inherited from class org.caleigo.core.ProxyEntity
ProxyEntity.ControlledProxyListener
 
Field Summary
 
Fields inherited from interface org.caleigo.core.IEntity
DIRTY, EMPTY, PERSISTENT
 
Constructor Summary
protected ControlledProxyEntity(IProxyController controller, IEntityDescriptor entityDescriptor)
          Creates new ControledSelectionProxy.
protected ControlledProxyEntity(IProxyController controller, IEntityDescriptor entityDescriptor, IEntityRelationPath relationPath)
          Creates new ControledSelectionProxy.
 
Method Summary
protected  IEntityRelationPath createRelationPath()
          Protected help method responsible for creating the relation path between the master and slave descriptor.
protected  void doOnControllerChange()
          This method is called each time the view entity object are replaced.
protected  void doOnControllerDataChange(IFieldDescriptor fieldDescriptor)
          This method is called each time any data in the viewed entity data are changed.
 void finalizeTransaction(boolean successful)
          The finalizeTransaction method is called after a transaction have been fully completed.
 IProxyController getController()
           
 IEntityRelationPath getRelationPath()
           
 boolean isEditable()
           
protected  void loadControlledProxies(boolean includeLocalRemote)
           
 void loadControlledProxiesCallback(int status)
           
 void prepareLoad(IDataTransaction transaction)
           
 void prepareStore(IDataTransaction transaction)
           
 
Methods inherited from class org.caleigo.core.ProxyEntity
addEntityChangeListener, addEntityListener, addProxyListener, clear, clearStatusFlag, compareTo, copyData, delete, doOnRemoteChange, equals, equalsExactly, fireDataChangedEvent, fireOpPerformedEvent, fireProxyEvent, fireStatusChangedEvent, getControlledProxies, getControlledProxy, getControlledProxyListener, getData, getData, getDataSource, getEntityDescriptor, getOriginQualifier, getRelayListener, getRemoteEntity, getSourceEntity, hasDirtyControlledProxies, hasRemoteEntity, hasSourceEntity, initializeEntity, isDataNull, isDirty, isEmpty, isFieldDirty, isPersistent, prepareControlledLoad, prepareControlledStore, refresh, releaseControlledProxy, removeEntityChangeListener, removeEntityListener, removeProxyListener, setData, setData, setData, setRemoteEntity, setStatusFlag, store, storeControlledProxies, toString, updateDirtyState, validateData
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.caleigo.core.IControlledProxy
getEntityDescriptor, isDirty
 

Constructor Detail

ControlledProxyEntity

protected ControlledProxyEntity(IProxyController controller,
                                IEntityDescriptor entityDescriptor)
Creates new ControledSelectionProxy. Note protected scope the class should normally be instantiated by a call to object impementing the IProxyController interface and the getControlledProxy method.


ControlledProxyEntity

protected ControlledProxyEntity(IProxyController controller,
                                IEntityDescriptor entityDescriptor,
                                IEntityRelationPath relationPath)
Creates new ControledSelectionProxy. Note protected scope the class should normally be instantiated by a call to object impementing the IProxyController interface and the getControlledProxy method.

Method Detail

loadControlledProxies

protected void loadControlledProxies(boolean includeLocalRemote)
                              throws DataServiceException
Overrides:
loadControlledProxies in class ProxyEntity
Throws:
DataServiceException

loadControlledProxiesCallback

public void loadControlledProxiesCallback(int status)
Overrides:
loadControlledProxiesCallback in class ProxyEntity

getController

public IProxyController getController()
Specified by:
getController in interface IControlledProxy

getRelationPath

public IEntityRelationPath getRelationPath()
Specified by:
getRelationPath in interface IControlledProxy

isEditable

public boolean isEditable()
Specified by:
isEditable in interface IControlledProxy

prepareLoad

public void prepareLoad(IDataTransaction transaction)
Specified by:
prepareLoad in interface IControlledProxy

prepareStore

public void prepareStore(IDataTransaction transaction)
Specified by:
prepareStore in interface IControlledProxy

finalizeTransaction

public void finalizeTransaction(boolean successful)
The finalizeTransaction method is called after a transaction have been fully completed. This method will always be called once after any call to prepareLoad or prepareStore.

Specified by:
finalizeTransaction in interface IControlledProxy
Overrides:
finalizeTransaction in class ProxyEntity

doOnControllerChange

protected void doOnControllerChange()
This method is called each time the view entity object are replaced. It is called prior to doOnControllerDataChange and cand does nothing by default.


doOnControllerDataChange

protected void doOnControllerDataChange(IFieldDescriptor fieldDescriptor)
This method is called each time any data in the viewed entity data are changed. It is called emidiately after doOnControllerChange and calls refreshRemoteSelection if any reference fields are changed.


createRelationPath

protected IEntityRelationPath createRelationPath()
Protected help method responsible for creating the relation path between the master and slave descriptor. The method is only called if no relation path was provided in the object construction. By default i creates a new EntityRelationPath with no provided waypoint by it can be overrriden for more customized bahaviour.



Copyright © 2005 Caleigo. All Rights Reserved.