public final class TupleUpdatedEvent extends AbstractTupleEvent
TupleUpdatedEvent.getOld()
will return null unless the event was propagated from a LiveResult
.
The LiveResult
will propagate the old tuple since it maintains a local copy of all tuples in the query result.keyData, tuple
source
Constructor and Description |
---|
TupleUpdatedEvent(Object source,
Long key,
Tuple oldTuple,
Tuple newTuple,
List<Schema.Field> changedFields)
Deprecated.
|
TupleUpdatedEvent(Object source,
Long oldKey,
Tuple oldTuple,
Tuple newTuple,
Tuple keyData,
List<Schema.Field> changedFields,
List<com.streambase.liveview.client.internal.TupleFieldComparator> fieldComparators) |
Modifier and Type | Method and Description |
---|---|
void |
dispatch(QueryListener listener)
Dispatches this event to the listener
|
List<Schema.Field> |
getChangedFields()
Retrieve a list of the fields that changed in this update
|
Tuple |
getOld()
Retrieve the old version of the tuple.
|
boolean |
hasOld()
See if the old tuple was included in this event
|
getKey, getKeyValue, getTuple
getSource, toString
public TupleUpdatedEvent(Object source, Long key, Tuple oldTuple, Tuple newTuple, List<Schema.Field> changedFields)
source
- the source of the eventkey
- the unique key of the tupleoldTuple
- the old tuple (may be null)newTuple
- the updated tuplechangedFields
- the list of changed fieldspublic TupleUpdatedEvent(Object source, Long oldKey, Tuple oldTuple, Tuple newTuple, Tuple keyData, List<Schema.Field> changedFields, List<com.streambase.liveview.client.internal.TupleFieldComparator> fieldComparators)
source
- the source of the eventoldKey
- the unique key of the tupleoldTuple
- the old tuple (may be null)newTuple
- the updated tuplekeyData
- The data for the full key. May be null only if oldKey is not 0.changedFields
- the list of changed fieldsfieldComparators
- The pre-built set of comparators for comparing complex keys. May be null only if oldKey is not 0.public Tuple getOld()
LiveResult
public boolean hasOld()
public List<Schema.Field> getChangedFields()
public void dispatch(QueryListener listener)
dispatch
in class AbstractQueryEvent
listener
- the query listener