net.esper.event
Class CompositeEventType

java.lang.Object
  extended by net.esper.event.CompositeEventType
All Implemented Interfaces:
EventType

public class CompositeEventType
extends Object
implements EventType

Event type for events that itself have event properties that are event wrappers.

For use in pattern expression statements in which multiple events match a pattern. There the composite event indicates that the whole patterns matched, and indicates the individual events that caused the pattern as event properties to the event.


Constructor Summary
CompositeEventType(Map<String,EventType> taggedEventTypes)
          Ctor.
 
Method Summary
 Iterator<EventType> getDeepSuperTypes()
          Returns iterator over all super types to event type, going up the hierarchy and including all Java interfaces (and their extended interfaces) and superclasses as EventType instances.
 EventPropertyGetter getGetter(String propertyName)
          Get the getter for a specified event property.
 String[] getPropertyNames()
          Get all valid property names for the event type.
 Class getPropertyType(String propertyName)
          Get the type of an event property as returned by the "getter" method for that property.
 EventType[] getSuperTypes()
          Returns an array of event types that are super to this event type, from which this event type inherited event properties.
 Class getUnderlyingType()
          Get the class that represents the Java type of the event type.
 boolean isProperty(String propertyName)
          Check that the given property name is valid for this event type, ie.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeEventType

public CompositeEventType(Map<String,EventType> taggedEventTypes)
Ctor.

Parameters:
taggedEventTypes - is a map of name tags and event type per tag
Method Detail

getPropertyType

public Class getPropertyType(String propertyName)
Description copied from interface: EventType
Get the type of an event property as returned by the "getter" method for that property. Returns unboxed (such as 'int.class') as well as boxed (java.lang.Integer) type. Returns null if the property name is not valid.

Specified by:
getPropertyType in interface EventType
Parameters:
propertyName - is the property name
Returns:
type of the property, the unboxed or the boxed type.

getUnderlyingType

public Class getUnderlyingType()
Description copied from interface: EventType
Get the class that represents the Java type of the event type. Returns a Java bean event class if the schema represents a Java bean event type. Returns java.util.Map is the schema represents a collection of values in a Map.

Specified by:
getUnderlyingType in interface EventType
Returns:
type of the event object

getGetter

public EventPropertyGetter getGetter(String propertyName)
Description copied from interface: EventType
Get the getter for a specified event property. Returns null if the property name is not valid.

Specified by:
getGetter in interface EventType
Parameters:
propertyName - is the property name
Returns:
a getter that can be used to obtain property values for event instances of the same event type

getPropertyNames

public String[] getPropertyNames()
Description copied from interface: EventType
Get all valid property names for the event type.

Specified by:
getPropertyNames in interface EventType
Returns:
A string array containing the property names of this typed event data object.

isProperty

public boolean isProperty(String propertyName)
Description copied from interface: EventType
Check that the given property name is valid for this event type, ie. that is exists in the event type.

Specified by:
isProperty in interface EventType
Parameters:
propertyName - is the property to check
Returns:
true if exists, false if not

getSuperTypes

public EventType[] getSuperTypes()
Description copied from interface: EventType
Returns an array of event types that are super to this event type, from which this event type inherited event properties.

For Java bean instances underlying the event this method returns the event types for all superclasses extended by the Java bean and all interfaces implemented by the Java bean.

Specified by:
getSuperTypes in interface EventType
Returns:
an array of event types

getDeepSuperTypes

public Iterator<EventType> getDeepSuperTypes()
Description copied from interface: EventType
Returns iterator over all super types to event type, going up the hierarchy and including all Java interfaces (and their extended interfaces) and superclasses as EventType instances.

Specified by:
getDeepSuperTypes in interface EventType
Returns:
iterator of event types represeting all superclasses and implemented interfaces, all the way up to java.lang.Object but excluding java.lang.Object itself