com.espertech.esper.event
Class EventBeanUtility

java.lang.Object
  extended by com.espertech.esper.event.EventBeanUtility

public class EventBeanUtility
extends 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(ArrayDequeJDK6Backport<EventBean[]> eventVector)
          Flatten the vector of arrays to an array.
static UniformPair<Set<MultiKey<EventBean>>> flattenBatchJoin(List<UniformPair<Set<MultiKey<EventBean>>>> joinPostings)
          Flattens a list of pairs of join result sets.
static UniformPair<EventBean[]> flattenBatchStream(List<UniformPair<EventBean[]>> updateVector)
          Flatten the vector of arrays to an array.
static UniformPair<EventBean[]> flattenList(ArrayDequeJDK6Backport<UniformPair<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 Object[] getPropertyArray(EventBean event, EventPropertyGetter[] propertyGetters)
          Returns object array containing property values of given properties, retrieved via EventPropertyGetter instances.
static String printEvent(EventBean event)
          Format the event and return a string representation.
static EventBean[] toArray(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

flattenList

public static UniformPair<EventBean[]> flattenList(ArrayDequeJDK6Backport<UniformPair<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

flatten

public static EventBean[] flatten(ArrayDequeJDK6Backport<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

flattenBatchStream

public static UniformPair<EventBean[]> flattenBatchStream(List<UniformPair<EventBean[]>> updateVector)
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:
updateVector - is a list of updates of old and new events
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(List<EventBean> eventList)
Convert list of events to array, returning null for empty or null lists.

Parameters:
eventList - is a list of events to convert
Returns:
array of events

getPropertyArray

public static 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 String printEvent(EventBean event)
Format the event and return a string representation.

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

flattenBatchJoin

public static UniformPair<Set<MultiKey<EventBean>>> flattenBatchJoin(List<UniformPair<Set<MultiKey<EventBean>>>> joinPostings)
Flattens a list of pairs of join result sets.

Parameters:
joinPostings - is the list
Returns:
is the consolidate sets

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