|
||||||||||
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 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.
Constructor Summary | |
---|---|
WrapperEventType(EventType eventType,
Map<String,Class> properties,
EventAdapterService eventAdapterService)
Ctor. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
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. |
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 |
Constructor Detail |
---|
public WrapperEventType(EventType eventType, Map<String,Class> properties, EventAdapterService eventAdapterService)
eventType
- 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 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 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |