|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.esper.event.WrapperEventType
public class WrapperEventType
An event type that adds zero or more fields to an existing event type.
The additional fields are represented as a Map. Any queries to event properties are first held against the additional fields, and secondly are handed through to the underlying event.
If this event type is to add information to another wrapper event type (wrapper to wrapper), then it is the responsibility of the creating logic to use the existing event type and add to it.
Uses a the map event type MapEventType
to represent the mapped properties. This is because the additional properties
can also be beans or complex types and the Map event type handles these nicely.
Field Summary | |
---|---|
protected EventType |
underlyingEventType
The underlying wrapped event type. |
protected MapEventType |
underlyingMapType
The map event type that provides the additional properties. |
Constructor Summary | |
---|---|
WrapperEventType(String typeName,
EventType eventType,
Map<String,Class> properties,
EventAdapterService eventAdapterService)
Ctor. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
String |
getAlias()
Returns the event type alias. |
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 property)
Get the getter for a specified event property. |
String[] |
getPropertyNames()
Get all valid property names for the event type. |
Class |
getPropertyType(String property)
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. |
EventType |
getUnderlyingEventType()
Returns the wrapped event type. |
MapEventType |
getUnderlyingMapType()
Returns the map type. |
Class |
getUnderlyingType()
Get the class that represents the Java type of the event type. |
int |
hashCode()
|
boolean |
isProperty(String property)
Check that the given property name is valid for this event type, ie. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final EventType underlyingEventType
protected final MapEventType underlyingMapType
Constructor Detail |
---|
public WrapperEventType(String typeName, EventType eventType, Map<String,Class> properties, EventAdapterService eventAdapterService)
typeName
- is the event type alias nameeventType
- is the event type of the wrapped eventsproperties
- is the additional properties this wrapper addseventAdapterService
- is the serMethod Detail |
---|
public Iterator<EventType> getDeepSuperTypes()
EventType
getDeepSuperTypes
in interface EventType
public String getAlias()
public EventPropertyGetter getGetter(String property)
EventType
getGetter
in interface EventType
property
- is the property name
public String[] getPropertyNames()
EventType
getPropertyNames
in interface EventType
public Class getPropertyType(String property)
EventType
getPropertyType
in interface EventType
property
- is the property name
public EventType[] getSuperTypes()
EventType
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.
getSuperTypes
in interface EventType
public Class getUnderlyingType()
EventType
getUnderlyingType
in interface EventType
public EventType getUnderlyingEventType()
public MapEventType getUnderlyingMapType()
public boolean isProperty(String property)
EventType
isProperty
in interface EventType
property
- is the property to check
public String toString()
toString
in class Object
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
© 2007 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 |