GWT 2.2.0

com.google.gwt.requestfactory.shared
Class EntityProxyChange<P extends EntityProxy>

java.lang.Object
  extended by com.google.gwt.event.shared.GwtEvent<EntityProxyChange.Handler<P>>
      extended by com.google.gwt.requestfactory.shared.EntityProxyChange<P>
Type Parameters:
P - the type of the proxy

public class EntityProxyChange<P extends EntityProxy>
extends GwtEvent<EntityProxyChange.Handler<P>>

Abstract base class for an event announcing changes to an EntityProxy.

Note that this event includes an unpopulated copy of the changed proxy — all properties are undefined except it's id. That is, the event includes only enough information for receivers to issue requests to get themselves fresh copies of the proxy.

TODO: use ProxyId rather than an empty proxy


Nested Class Summary
static interface EntityProxyChange.Handler<P extends EntityProxy>
          Implemented by methods that handle EntityProxyChange events.
 
Nested classes/interfaces inherited from class com.google.gwt.event.shared.GwtEvent
GwtEvent.Type<H>
 
Constructor Summary
EntityProxyChange(P proxy, WriteOperation writeOperation)
          Constructs an EntityProxyChange object.
 
Method Summary
protected  void dispatch(EntityProxyChange.Handler<P> handler)
          Should only be called by HandlerManager.
 GwtEvent.Type<EntityProxyChange.Handler<P>> getAssociatedType()
          Returns the type associated with this instance.
 EntityProxyId<P> getProxyId()
          Returns an unpopulated copy of the changed proxy — all properties are undefined except its id.
 WriteOperation getWriteOperation()
          Returns the WriteOperation associated with this instance.
static
<P extends EntityProxy>
HandlerRegistration
registerForProxyType(EventBus eventBus, java.lang.Class<P> proxyType, EntityProxyChange.Handler<P> handler)
          Register a handler for a EntityProxyChange events for a particular proxy class.
 
Methods inherited from class com.google.gwt.event.shared.GwtEvent
assertLive, getSource, isLive, kill, revive, toDebugString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EntityProxyChange

public EntityProxyChange(P proxy,
                         WriteOperation writeOperation)
Constructs an EntityProxyChange object.

Parameters:
proxy - an EntityProxy instance of type P
writeOperation - a WriteOperation instance
Method Detail

registerForProxyType

public static <P extends EntityProxy> HandlerRegistration registerForProxyType(EventBus eventBus,
                                                                               java.lang.Class<P> proxyType,
                                                                               EntityProxyChange.Handler<P> handler)
Register a handler for a EntityProxyChange events for a particular proxy class.

Parameters:
eventBus - the EventBus
proxyType - a Class instance of type P
handler - an EntityProxyChange.Handler instance of type P
Returns:
an EntityProxy instance

getAssociatedType

public GwtEvent.Type<EntityProxyChange.Handler<P>> getAssociatedType()
Returns the type associated with this instance.

Specified by:
getAssociatedType in class GwtEvent<EntityProxyChange.Handler<P extends EntityProxy>>
Returns:
an instance of GwtEvent.Type of type Handler<P>

getProxyId

public EntityProxyId<P> getProxyId()
Returns an unpopulated copy of the changed proxy — all properties are undefined except its id.

Returns:
an instance of EntityProxyId<P>

getWriteOperation

public WriteOperation getWriteOperation()
Returns the WriteOperation associated with this instance.

Returns:
a WriteOperation instance

dispatch

protected void dispatch(EntityProxyChange.Handler<P> handler)
Description copied from class: GwtEvent
Should only be called by HandlerManager. In other words, do not use or call.

Specified by:
dispatch in class GwtEvent<EntityProxyChange.Handler<P extends EntityProxy>>
Parameters:
handler - handler

GWT 2.2.0