Class WrapperEventBean
- All Implemented Interfaces:
EventBean
,DecoratingEventBean
,EventBeanSPI
This can be useful for classes for which the statement adds derived values retaining the original class.
The event type of such events is always WrapperEventType
. Additional properties are stored in a
Map.
-
Field Summary
Fields inherited from interface com.espertech.esper.common.internal.event.core.DecoratingEventBean
EPTYPE
Fields inherited from interface com.espertech.esper.common.client.EventBean
EPTYPE, EPTYPEARRAY, EPTYPEARRAYARRAY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the value of an event property for the given property name or property expression.Returns decorating properties.Return theEventType
instance that describes the set of properties available for this event.getFragment
(String propertyExpression) Returns event beans or array of event bean for a property name or property expression.Get the underlying data object to this event wrapper.Returns the underlying event to the decorated event.Returns the underlying map storing the additional properties, if any.void
setUnderlying
(Object underlying) toString()
-
Constructor Details
-
WrapperEventBean
Ctor.- Parameters:
theEvent
- is the wrapped eventproperties
- is zero or more property values that embellish the wrapped eventeventType
- is theWrapperEventType
.
-
-
Method Details
-
get
Description copied from interface:EventBean
Returns the value of an event property for the given property name or property expression.Returns null if the property value is null. Throws an exception if the expression is not valid against the event type.
The method takes a property name or property expression as a parameter. Property expressions may include indexed properties via the syntax "name[index]", mapped properties via the syntax "name('key')", nested properties via the syntax "outer.inner" or combinations thereof.
- Specified by:
get
in interfaceEventBean
- Parameters:
property
- - name or expression of the property whose value is to be retrieved- Returns:
- the value of a property with the specified name.
- Throws:
PropertyAccessException
- - if there is no property of the specified name, or the property cannot be accessed
-
getEventType
Description copied from interface:EventBean
Return theEventType
instance that describes the set of properties available for this event.- Specified by:
getEventType
in interfaceEventBean
- Returns:
- event type
-
getUnderlying
Description copied from interface:EventBean
Get the underlying data object to this event wrapper.- Specified by:
getUnderlying
in interfaceEventBean
- Returns:
- underlying data object, usually either a Map or a Java bean instance.
-
getUnderlyingMap
Returns the underlying map storing the additional properties, if any.- Returns:
- event property map
-
getDecoratingProperties
Description copied from interface:DecoratingEventBean
Returns decorating properties.- Specified by:
getDecoratingProperties
in interfaceDecoratingEventBean
- Returns:
- property name and values
-
getUnderlyingEvent
Description copied from interface:DecoratingEventBean
Returns the underlying event to the decorated event.- Specified by:
getUnderlyingEvent
in interfaceDecoratingEventBean
- Returns:
- underlying
-
toString
-
getFragment
Description copied from interface:EventBean
Returns event beans or array of event bean for a property name or property expression.For use with properties whose value is itself an event or whose value can be represented as an event by the underlying event representation.
The
EventType
of the event bean instance(s) returned by this method can be determined byEventType.getFragmentType(String)
. UseEventPropertyDescriptor
to obtain a list of properties that return fragments from an event type.Returns null if the property value is null or the property value cannot be represented as a fragment by the underlying representation.
The method takes a property name or property expression as a parameter. Property expressions may include indexed properties via the syntax "name[index]", mapped properties via the syntax "name('key')", nested properties via the syntax "outer.inner" or combinations thereof.
- Specified by:
getFragment
in interfaceEventBean
- Parameters:
propertyExpression
- - name or expression of the property whose value is to be presented as an EventBean or array of EventBean- Returns:
- the value of a property as an EventBean or array of EventBean
-
setUnderlying
- Specified by:
setUnderlying
in interfaceEventBeanSPI
-