net.esper.event
Class EventBeanUtility

java.lang.Object
  extended by net.esper.event.EventBeanUtility

public class EventBeanUtility
extends java.lang.Object

Method to getSelectListEvents events in collections to other collections or other event types.


Constructor Summary
EventBeanUtility()
           
 
Method Summary
protected static EventBean[] append(EventBean[] source, EventBean[] append)
          Append arrays.
static EventBean[] flatten(java.util.Vector<EventBean[]> eventVector)
          Flatten the vector of arrays to an array.
static MultiKeyUntyped getMultiKey(EventBean event, EventPropertyGetter[] propertyGetters)
          Returns Multikey instance for given event and getters.
static java.lang.Object[] getPropertyArray(EventBean event, EventPropertyGetter[] propertyGetters)
          Returns object array containing property values of given properties, retrieved via EventPropertyGetter instances.
static java.lang.String printEvent(EventBean event)
          Format the event and return a string representation.
static EventBean[] toArray(java.util.List<EventBean> eventList)
          Convert list of events to array, returning null for empty or null lists.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventBeanUtility

public EventBeanUtility()
Method Detail

flatten

public static EventBean[] flatten(java.util.Vector<EventBean[]> eventVector)
Flatten the vector of arrays to an array. Return null if an empty vector was passed, else return an array containing all the events.

Parameters:
eventVector - vector
Returns:
array with all events

append

protected static EventBean[] append(EventBean[] source,
                                    EventBean[] append)
Append arrays.

Parameters:
source - array
append - array
Returns:
appended array

toArray

public static EventBean[] toArray(java.util.List<EventBean> eventList)
Convert list of events to array, returning null for empty or null lists.

Parameters:
eventList -
Returns:
array of events

getPropertyArray

public static java.lang.Object[] getPropertyArray(EventBean event,
                                                  EventPropertyGetter[] propertyGetters)
Returns object array containing property values of given properties, retrieved via EventPropertyGetter instances.

Parameters:
event - - event to get property values from
propertyGetters - - getters to use for getting property values
Returns:
object array with property values

getMultiKey

public static MultiKeyUntyped getMultiKey(EventBean event,
                                          EventPropertyGetter[] propertyGetters)
Returns Multikey instance for given event and getters.

Parameters:
event - - event to get property values from
propertyGetters - - getters for access to properties
Returns:
MultiKey with property values

printEvent

public static java.lang.String printEvent(EventBean event)
Format the event and return a string representation.

Parameters:
event - is the event to format.
Returns:
string representation of event