T - the type of entry being handled by this event. This must match the type on the set
that generated this event.public class EntryUpdatedEvent<T extends DSet.Entry> extends EntryEvent<T>
DSet is updated. It can also be
constructed to request the update of an entry and posted to the dobjmgr.Streamable.Closure| Constructor and Description |
|---|
EntryUpdatedEvent(int targetOid,
String name,
T entry)
Constructs a new entry updated event on the specified target object for the specified set
name and with the supplied updated entry.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
alreadyApplied()
If this event applies itself immediately to the distributed object on the server and then
NOOPs later when
DEvent.applyToObject(com.threerings.presents.dobj.DObject) is called, it should return true from this method. |
boolean |
applyToObject(DObject target)
Applies the attribute modifications represented by this event to the specified target
object.
|
T |
getEntry()
Return the new or updated entry, or
null if the entry was removed. |
Comparable<?> |
getKey()
Return the key that identifies the entry related to this event.
|
T |
getOldEntry()
Return the old entry, or
null if the entry is newly added. |
getNamegetActualTransport, getSourceOid, getTargetOid, getTransport, isPrivate, noteActualTransport, setSourceOid, setTargetOid, setTransport, toStringpublic EntryUpdatedEvent(int targetOid,
String name,
T entry)
targetOid - the object id of the object to whose set we will add an entry.name - the name of the attribute in which to update the specified entry.entry - the entry to update.public Comparable<?> getKey()
EntryEventnull.getKey in class EntryEvent<T extends DSet.Entry>public T getEntry()
null if the entry was removed.
This implementation never returns null.getEntry in class EntryEvent<T extends DSet.Entry>public T getOldEntry()
null if the entry is newly added.
This implementation never returns null.getOldEntry in class EntryEvent<T extends DSet.Entry>public boolean alreadyApplied()
DEventDEvent.applyToObject(com.threerings.presents.dobj.DObject) is called, it should return true from this method.
If it will modify the object during its DEvent.applyToObject(com.threerings.presents.dobj.DObject) call, it should return false.alreadyApplied in class DEventpublic boolean applyToObject(DObject target) throws ObjectAccessException
DEventapplyToObject in class DEventObjectAccessException - thrown if there is any problem applying the event to the
object (invalid attribute, etc.).Copyright © 2015. All rights reserved.