public interface EventDatagramWithProperties extends ImmutableEventDatagram
Title: Structured Data Objects
Description: Defines an Event Datagram that can have properties.
Copyright: Copyright (c) 2014
Company: StreamScape Technologies
SEMANTIC_TYPE_NAME
DEFAULT_SERIAL_VERSION_ID
Modifier and Type | Method and Description |
---|---|
boolean |
canConvertEventProperty(java.lang.String propertyName,
PropertyType propertyType)
Checks if the value of the specified property can be converted to the object of the specified type.
|
void |
clearEventProperties()
Clears all the properties.
|
boolean |
existsEventProperty(java.lang.String name)
Checks if the property with the specified name exists.
|
java.math.BigDecimal |
getEventBigDecimalProperty(java.lang.String name)
Returns the value of the
BigDecimal property with the specified name. |
boolean |
getEventBooleanProperty(java.lang.String name)
Returns the value of the
Boolean property with the specified name. |
byte |
getEventByteProperty(java.lang.String name)
Returns the value of the
Byte property with the specified name. |
double |
getEventDoubleProperty(java.lang.String name)
Returns the value of the
Double property with the specified name. |
float |
getEventFloatProperty(java.lang.String name)
Returns the value of the
Float property with the specified name. |
int |
getEventIntProperty(java.lang.String name)
Returns the value of the
Integer property with the specified name. |
long |
getEventLongProperty(java.lang.String name)
Returns the value of the
Long property with the specified name. |
java.lang.Object |
getEventObjectProperty(java.lang.String name)
Returns the value of the
Object property with the specified name. |
java.util.Set |
getEventPropertyNames()
Returns a list of existing property names.
|
PropertyType |
getEventPropertyType(java.lang.String propertyName)
Returns the type of the event property with the specified name.
|
short |
getEventShortProperty(java.lang.String name)
Returns the value of the
Short property with the specified name. |
java.lang.String |
getEventStringProperty(java.lang.String name)
Returns the value of the
String property with the specified name. |
void |
removeEventProperty(java.lang.String name)
Removes the event property with the specified name.
|
void |
setEventBigDecimalProperty(java.lang.String name,
java.math.BigDecimal value)
Sets the specified value of a
BigDecimal property with the specified name. |
void |
setEventBigDecimalProperty(java.lang.String name,
int precision,
int scale)
Sets a template value of a
BigDecimal property with the specified name. |
void |
setEventBooleanProperty(java.lang.String name,
boolean value)
Sets the specified value of a
Boolean property with the specified name. |
void |
setEventByteProperty(java.lang.String name,
byte value)
Sets the specified value of a
Byte property with the specified name. |
void |
setEventDoubleProperty(java.lang.String name,
double value)
Sets the specified value of a
Double property with the specified name. |
void |
setEventFloatProperty(java.lang.String name,
float value)
Sets the specified value of a
Float property with the specified name. |
void |
setEventIntProperty(java.lang.String name,
int value)
Sets the specified value of a
Integer property with the specified name. |
void |
setEventLongProperty(java.lang.String name,
long value)
Sets the specified value of a
Long property with the specified name. |
void |
setEventObjectProperty(java.lang.String name,
java.lang.Object value)
Sets a user defined property for this event datagram.
|
void |
setEventShortProperty(java.lang.String name,
short value)
Sets the specified value of a
Short property with the specified name. |
void |
setEventStringProperty(java.lang.String name,
java.lang.String value)
Sets the specified value of a
String property with the specified name. |
clone, getDurable, getEventGroupId, getEventId, getEventKey, getEventSource, getTimestamp, getTransmitAccess
getSerialVersionUID
java.lang.Object getEventObjectProperty(java.lang.String name) throws SDOException
Object
property with the specified name.name
- the specified property name.null
if the property with the specified name is not found.SDOException
- if the specified name has invalid format.boolean getEventBooleanProperty(java.lang.String name) throws SDOException
Boolean
property with the specified name.name
- the specified property name.Boolean
property.SDOException
- if the specified name has invalid format or
if the Boolean
property with the specified name is not found.byte getEventByteProperty(java.lang.String name) throws SDOException
Byte
property with the specified name.name
- the specified property name.Byte
property.SDOException
- if the specified name has invalid format or
if the Byte
property with the specified name is not found.short getEventShortProperty(java.lang.String name) throws SDOException
Short
property with the specified name.name
- the specified property name.Short
property.SDOException
- if the specified name has invalid format or
if the Short
property with the specified name is not found.int getEventIntProperty(java.lang.String name) throws SDOException
Integer
property with the specified name.name
- the specified property name.Integer
property.SDOException
- if the specified name has invalid format or
if the Integer
property with the specified name is not found.long getEventLongProperty(java.lang.String name) throws SDOException
Long
property with the specified name.name
- the specified property name.Long
property.SDOException
- if the specified name has invalid format or
if the Long
property with the specified name is not found.float getEventFloatProperty(java.lang.String name) throws SDOException
Float
property with the specified name.name
- the specified property name.Float
property.SDOException
- if the specified name has invalid format or
if the Float
property with the specified name is not found.double getEventDoubleProperty(java.lang.String name) throws SDOException
Double
property with the specified name.name
- the specified property name.Double
property.SDOException
- if the specified name has invalid format or
if the Double
property with the specified name is not found.java.math.BigDecimal getEventBigDecimalProperty(java.lang.String name) throws SDOException
BigDecimal
property with the specified name.name
- the specified property name.BigDecimal
property.SDOException
- if the specified name has invalid format or
if the BigDecimal
property with the specified name is not found.java.lang.String getEventStringProperty(java.lang.String name) throws SDOException
String
property with the specified name.name
- the specified property name.String
property.SDOException
- if the specified name has invalid format or
if the String
property with the specified name is not found.void setEventObjectProperty(java.lang.String name, java.lang.Object value) throws SDOException
Java Messaging Service
properties. This allows EventGrams to be routed and filtered by a variety
of technologies including SAX and XSLT processors.
If this event datagram has been created from a prototype (by method DatagramFactory.createEvent(String)
),
adding of new properties is not allowed. An exception will be thrown if the specified property does not exist.
Adding of new properties is allowed for uninitialized event datagram intended for a prototype creation
(such datagram can be created by methods like DatagramFactory.newEventInstance(String)
or
DatagramFactory.newEventInstanceFrom(String)
).
The following table describes allowable property type mapping capabilities:
+-------------+------------------------------------------------------------+ | | boolean byte short int long float double BigDecimal String | +------------ +------------------------------------------------------------+ | boolean | X X | | byte | X X X X X X | | short | X X X X X | | int | X X X X | | long | X X X | | float | X X X X | | double | X X X | | BigDecimal | X X | | String | X X X X X X X X X | +-------------+------------------------------------------------------------+The method only allows object versions of java primitive types to be set. Setting the property to
null
is not allowed.name
- the property name to be set.value
- the property value to be set.SDORuntimeException
- if the event is coalesced (locked for editing).SDOException
- if the specified property does not exist and this event has been created from a prototype or
if some internal error occurs.void setEventBooleanProperty(java.lang.String name, boolean value) throws SDOException
Boolean
property with the specified name.name
- the property name to be set.value
- the property value to be set.SDORuntimeException
- if the event is coalesced (locked for editing).SDOException
- if the specified property does not exist and this event has been created from a prototype or
if some internal error occurs.void setEventByteProperty(java.lang.String name, byte value) throws SDOException
Byte
property with the specified name.name
- the property name to be set.value
- the property value to be set.SDORuntimeException
- if the event is coalesced (locked for editing).SDOException
- if the specified property does not exist and this event has been created from a prototype or
if some internal error occurs.void setEventShortProperty(java.lang.String name, short value) throws SDOException
Short
property with the specified name.name
- the property name to be set.value
- the property value to be set.SDORuntimeException
- if the event is coalesced (locked for editing).SDOException
- if the specified property does not exist (in a case if this event has been created from a prototype) or
if some internal error occurs.void setEventIntProperty(java.lang.String name, int value) throws SDOException
Integer
property with the specified name.name
- the property name to be set.value
- the property value to be set.SDORuntimeException
- if the event is coalesced (locked for editing).SDOException
- if the specified property does not exist and this event has been created from a prototype or
if some internal error occurs.void setEventLongProperty(java.lang.String name, long value) throws SDOException
Long
property with the specified name.name
- the property name to be set.value
- the property value to be set.SDORuntimeException
- if the event is coalesced (locked for editing).SDOException
- if the specified property does not exist and this event has been created from a prototype or
if some internal error occurs.void setEventFloatProperty(java.lang.String name, float value) throws SDOException
Float
property with the specified name.name
- the property name to be set.value
- the property value to be set.SDORuntimeException
- if the event is coalesced (locked for editing).SDOException
- if the specified property does not exist and this event has been created from a prototype or
if some internal error occurs.void setEventDoubleProperty(java.lang.String name, double value) throws SDOException
Double
property with the specified name.name
- the property name to be set.value
- the property value to be set.SDORuntimeException
- if the event is coalesced (locked for editing).SDOException
- if the specified property does not exist and this event has been created from a prototype or
if some internal error occurs.void setEventBigDecimalProperty(java.lang.String name, java.math.BigDecimal value) throws SDOException
BigDecimal
property with the specified name.
This property in an event prototype is used as a template for all event instances based on this prototype.
All values set by this method will be converted in accordance with the template value
(e.g. precision and scale will be taken from the template value).
If a template value is 0
it is treated as a value with precision 128
and scale 0
.
name
- the property name to be set.value
- the property value to be set.SDORuntimeException
- if the event is coalesced (locked for editing).SDOException
- if the specified property does not exist and this event has been created from a prototype or
if some internal error occurs.void setEventBigDecimalProperty(java.lang.String name, int precision, int scale) throws SDOException
BigDecimal
property with the specified name.
BigDecimal
value with the specified precision and scale filling it with '9' digits.
E.g. setEventBigDecimalProperty("example", 10, 3)
makes the property "example" with value -9999999.999
.
This method is applicable only if this datagram is an event prototype.
It is used for defining a template property in an event prototype (see setEventBigDecimalProperty(String, java.math.BigDecimal)
)
for further information).
name
- the property name to be set.precision
- the precision to be set.scale
- the scale to be set.SDORuntimeException
- if the event is coalesced (locked for editing).SDOException
- if this event is not an event prototype or
if precision is not a positive number or
if scale is negative number or
if some internal error occurs.void setEventStringProperty(java.lang.String name, java.lang.String value) throws SDOException
String
property with the specified name.name
- the property name to be set.value
- the property value to be set.SDORuntimeException
- if the event is coalesced (locked for editing).SDOException
- if the specified property does not exist and this event has been created from a prototype or
if some internal error occurs.void removeEventProperty(java.lang.String name) throws SDOException
If this event datagram has been created from a prototype (by method DatagramFactory.createEvent(String)
),
removing of existing properties is not allowed. An exception will be thrown if the specified property exists.
Removing of existing properties is allowed for uninitialized event datagram intended for a prototype creation
(such datagram can be created by methods like DatagramFactory.newEventInstance(String)
or
DatagramFactory.newEventInstanceFrom(String)
).
name
- the name of the property to be removed.SDORuntimeException
- if the event is coalesced (locked for editing).SDOException
- if the specified name has invalid format or
if the specified property is an annotated property or
if the specified property exists and this event has been created from a prototype or
if some internal error occurs.boolean existsEventProperty(java.lang.String name) throws SDOException
name
- the name of the property to be checked.true
if the specified property exists, false
otherwise.SDOException
- if the specified name has invalid format.java.util.Set getEventPropertyNames()
void clearEventProperties()
SDORuntimeException
- if the event is coalesced (locked for editing).PropertyType getEventPropertyType(java.lang.String propertyName) throws SDOException
propertyName
- the specified property name.null
if the property with the specified name is not found.SDOException
- if the specified name has invalid format.boolean canConvertEventProperty(java.lang.String propertyName, PropertyType propertyType) throws SDOException
propertyName
- the name of the property to be checked.propertyType
- the specified property type.true
if the specified property value can be converted to specified type instance, false
otherwise.SDOException
- if the specified name has invalid format.Copyright © 2015-2024 StreamScape Technologies. All rights reserved.