com.espertech.esper.event
Class MapEventBean

java.lang.Object
  extended by com.espertech.esper.event.MapEventBean
All Implemented Interfaces:
EventBean

public class MapEventBean
extends Object
implements EventBean

Wrapper for events represented by a Map of key-value pairs that are the event properties. MapEventBean instances are equal if they have the same EventType and all property names and values are reference-equal.


Constructor Summary
MapEventBean(EventType eventType)
          Constructor for the mutable functions, e.g.
MapEventBean(EventType eventType, Map<String,EventBean> events)
          Constructor for initialization with existing values.
MapEventBean(Map<String,Object> properties, EventType eventType)
          Constructor for initialization with existing values.
 
Method Summary
 Object get(String property)
          Returns the value of an event property.
 EventType getEventType()
          Return the EventType instance that describes the set of properties available for this event.
 Object getUnderlying()
          Get the underlying data object to this event wrapper.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MapEventBean

public MapEventBean(Map<String,Object> properties,
                    EventType eventType)
Constructor for initialization with existing values. Makes a shallow copy of the supplied values to not be surprised by changing property values.

Parameters:
properties - are the event property values
eventType - is the type of the event, i.e. describes the map entries

MapEventBean

public MapEventBean(EventType eventType,
                    Map<String,EventBean> events)
Constructor for initialization with existing values. Makes a shallow copy of the supplied values to not be surprised by changing property values.

Parameters:
eventType - is the type of the event, i.e. describes the map entries
events - are the event property constisting of events

MapEventBean

public MapEventBean(EventType eventType)
Constructor for the mutable functions, e.g. only the type of values is known but not the actual values.

Parameters:
eventType - is the type of the event, i.e. describes the map entries
Method Detail

getEventType

public EventType getEventType()
Description copied from interface: EventBean
Return the EventType instance that describes the set of properties available for this event.

Specified by:
getEventType in interface EventBean
Returns:
event type

get

public Object get(String property)
           throws IllegalArgumentException,
                  PropertyAccessException
Description copied from interface: EventBean
Returns the value of an event property.

Specified by:
get in interface EventBean
Parameters:
property - - name of the property whose value is to be retrieved
Returns:
the value of a simple property with the specified name.
Throws:
PropertyAccessException - - if there is no property of the specified name, or the property cannot be accessed
IllegalArgumentException

getUnderlying

public Object getUnderlying()
Description copied from interface: EventBean
Get the underlying data object to this event wrapper.

Specified by:
getUnderlying in interface EventBean
Returns:
underlying data object, usually either a Map or a Java bean instance.

toString

public String toString()
Overrides:
toString in class Object

© 2007 EsperTech Inc.
All rights reserved.
Visit us at espertech.com