public final class DeltaEvent extends com.streamscape.sdo.event.AbstractMutableEvent implements DeltaEventDatagram, PayloadEvent
Title: Structured Data Objects: Delta Event
Description: An event which contains delta information for some modified object. The delta event stores the images of the object before and after modification.
A delta event provides before/after images of some data elements or possibly other eventgrams.
It is used for change capture, data replication and potentially other situations where diff
style operations are required. Annotations and other access methods are fully supported.
Copyright: Copyright (c) 2011
Company: StreamScape Technologies
SEMANTIC_TYPE_NAME
DEFAULT_SERIAL_VERSION_ID
Modifier and Type | Method and Description |
---|---|
void |
checkPayloadClass(java.lang.Class payloadClass) |
boolean |
equals()
Checks if the data image after modification is equal to the image before modification.
|
boolean |
equals(java.lang.Object other) |
java.lang.Object |
getAfterImage()
Returns the data image after modification.
|
java.lang.Object |
getBeforeImage()
Returns the data image before modification.
|
java.util.List |
getDeltaElements()
This method is not supported.
|
java.util.Map |
getDeltas()
This method is not supported.
|
java.lang.Class |
getPayloadClass()
Returns a class of the event payload.
|
boolean |
matchesPayloadClass(java.lang.Class dataClass,
java.lang.Class newDataClass) |
void |
setAfterImage(java.lang.Object newImage)
Sets the data image after modification.
|
void |
setBeforeImage(java.lang.Object newImage)
Sets the data image before modification.
|
addAnnotation, clearEventProperties, protect, removeAnnotation, removeEventProperty, resetReplyTo, setCorrelationId, setCorrelationIdAsBytes, setDurable, setEventBigDecimalProperty, setEventBigDecimalProperty, setEventBooleanProperty, setEventByteProperty, setEventDoubleProperty, setEventExpiration, setEventFloatProperty, setEventGroupId, setEventIntProperty, setEventKey, setEventLongProperty, setEventObjectProperty, setEventShortProperty, setEventStringProperty, setFinal, setForwardTo, setReplyTo, setSecurityAssertionToken, setSecurityAssertionTokenAsBytes, unprotect
canConvertEventProperty, clone, existsEventProperty, getAnnotatedProperties, getAnnotation, getCorrelationId, getCorrelationIdAsBytes, getDurable, getEventBigDecimalProperty, getEventBooleanProperty, getEventByteProperty, getEventDoubleProperty, getEventExpiration, getEventFloatProperty, getEventGroupId, getEventId, getEventIntProperty, getEventKey, getEventLongProperty, getEventObjectProperty, getEventPropertyNames, getEventPropertyType, getEventShortProperty, getEventSource, getEventStringProperty, getForwardTo, getPermissions, getReadAccess, getReplyTo, getSecurityAssertionToken, getSecurityAssertionTokenAsBytes, getTimestamp, getTransmitAccess, getWriteAccess, hasAnnotatedProperties, hasSuitableAnnotationType, isProtected
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addAnnotation, canConvertEventProperty, clearEventProperties, existsEventProperty, getAnnotatedProperties, getAnnotation, getCorrelationId, getCorrelationIdAsBytes, getEventBigDecimalProperty, getEventBooleanProperty, getEventByteProperty, getEventDoubleProperty, getEventExpiration, getEventFloatProperty, getEventIntProperty, getEventLongProperty, getEventObjectProperty, getEventPropertyNames, getEventPropertyType, getEventShortProperty, getEventStringProperty, getForwardTo, getPermissions, getReadAccess, getReplyTo, getSecurityAssertionToken, getSecurityAssertionTokenAsBytes, getTransmitAccess, getWriteAccess, hasAnnotatedProperties, isProtected, protect, removeAnnotation, removeEventProperty, resetReplyTo, setCorrelationId, setCorrelationIdAsBytes, setDurable, setEventBigDecimalProperty, setEventBigDecimalProperty, setEventBooleanProperty, setEventByteProperty, setEventDoubleProperty, setEventExpiration, setEventFloatProperty, setEventGroupId, setEventIntProperty, setEventKey, setEventLongProperty, setEventObjectProperty, setEventShortProperty, setEventStringProperty, setFinal, setForwardTo, setReplyTo, setSecurityAssertionToken, setSecurityAssertionTokenAsBytes, unprotect
clone, getDurable, getEventGroupId, getEventId, getEventKey, getEventSource, getTimestamp
getSerialVersionUID
public java.lang.Class getPayloadClass()
getPayloadClass
in interface PayloadEvent
public java.lang.Object getBeforeImage() throws SecurityViolationException, SDOException
For the event instance that is processed by an event listener, this method clones the data (for first time) before returning.
This is necessary to avoid changing the initial event instance (since there is no guarantee that user won't change a returned data).
In that case if the user wants to avoid overhead of data cloning he should inherit a data class from
CloneableDataObject
and override the method CloneableDataObject.clone()
if needed.
If the data class is not inherited from CloneableDataObject
the event data will be cloned
using 'serialization/deserialization' idiom.
getBeforeImage
in interface DeltaEventDatagram
SecurityViolationException
- if the event is protected from read access.SDOException
- if some internal error occurs.public void setBeforeImage(java.lang.Object newImage) throws SDOException, SecurityViolationException
setBeforeImage
in interface DeltaEventDatagram
newImage
- the data image to be set.SDORuntimeException
- if the event is coalesced (locked for editing).SDOException
- if the specified newImage
is null
or
if the specified data has wrong type.SecurityViolationException
- if the event is protected from write access.public java.lang.Object getAfterImage() throws SecurityViolationException, SDOException
For the event instance that is processed by an event listener, this method clones the data (for first time) before returning.
This is necessary to avoid changing the initial event instance (since there is no guarantee that user won't change a returned data).
In that case if the user wants to avoid overhead of data cloning he should inherit a data class from
CloneableDataObject
and override the method CloneableDataObject.clone()
if needed.
If the data class is not inherited from CloneableDataObject
the event data will be cloned
using 'serialization/deserialization' idiom.
getAfterImage
in interface DeltaEventDatagram
SecurityViolationException
- if the event is protected from read access.SDOException
- if some internal error occurs.public void setAfterImage(java.lang.Object newImage) throws SDOException, SecurityViolationException
setAfterImage
in interface DeltaEventDatagram
newImage
- the data image to be set.SDORuntimeException
- if the event is coalesced (locked for editing).SDOException
- if the specified newImage
is null
or
if the specified data has wrong type.SecurityViolationException
- if the event is protected from write access.public boolean equals()
equals
in interface DeltaEventDatagram
true
if the data image after modification is equal to the image before modification, false
otherwise.public java.util.List getDeltaElements()
getDeltaElements
in interface DeltaEventDatagram
public java.util.Map getDeltas()
getDeltas
in interface DeltaEventDatagram
public boolean equals(java.lang.Object other)
equals
in class com.streamscape.sdo.IAbstractDataEvent
public void checkPayloadClass(java.lang.Class payloadClass) throws SDOException
SDOException
public boolean matchesPayloadClass(java.lang.Class dataClass, java.lang.Class newDataClass)
Copyright © 2015-2024 StreamScape Technologies. All rights reserved.