|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.event.WrapperEventBean
public class WrapperEventBean
Event bean that wraps another event bean adding additional properties.
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.
Constructor Summary | |
---|---|
WrapperEventBean(EventBean theEvent,
java.util.Map<java.lang.String,java.lang.Object> properties,
EventType eventType)
Ctor. |
Method Summary | |
---|---|
java.lang.Object |
get(java.lang.String property)
Returns the value of an event property for the given property name or property expression. |
java.util.Map<java.lang.String,java.lang.Object> |
getDecoratingProperties()
Returns decorating properties. |
EventType |
getEventType()
Return the EventType instance that describes the set of properties available for this event. |
java.lang.Object |
getFragment(java.lang.String propertyExpression)
Returns event beans or array of event bean for a property name or property expression. |
java.lang.Object |
getUnderlying()
Get the underlying data object to this event wrapper. |
EventBean |
getUnderlyingEvent()
Returns the underlying event to the decorated event. |
java.util.Map |
getUnderlyingMap()
Returns the underlying map storing the additional properties, if any. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public WrapperEventBean(EventBean theEvent, java.util.Map<java.lang.String,java.lang.Object> properties, EventType eventType)
theEvent
- is the wrapped eventproperties
- is zero or more property values that embellish the wrapped eventeventType
- is the WrapperEventType
.Method Detail |
---|
public java.lang.Object get(java.lang.String property) throws PropertyAccessException
EventBean
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.
get
in interface EventBean
property
- - name or expression of the property whose value is to be retrieved
PropertyAccessException
- - if there is no property of the specified name, or the property cannot be accessedpublic EventType getEventType()
EventBean
EventType
instance that describes the set of properties available for this event.
getEventType
in interface EventBean
public java.lang.Object getUnderlying()
EventBean
getUnderlying
in interface EventBean
public java.util.Map getUnderlyingMap()
public java.util.Map<java.lang.String,java.lang.Object> getDecoratingProperties()
DecoratingEventBean
getDecoratingProperties
in interface DecoratingEventBean
public EventBean getUnderlyingEvent()
DecoratingEventBean
getUnderlyingEvent
in interface DecoratingEventBean
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object getFragment(java.lang.String propertyExpression)
EventBean
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 by
EventType.getFragmentType(String)
. Use EventPropertyDescriptor
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.
getFragment
in interface EventBean
propertyExpression
- - name or expression of the property whose value is to be presented as an EventBean or array of EventBean
|
© 2006-2015 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |