com.espertech.esper.event.vaevent
Class PropertyUtility

java.lang.Object
  extended by com.espertech.esper.event.vaevent.PropertyUtility

public class PropertyUtility
extends java.lang.Object

Utility for handling properties for the purpose of merging and versioning by revision event types.


Constructor Summary
PropertyUtility()
           
 
Method Summary
static PropertyGroupDesc[] analyzeGroups(java.lang.String[] allProperties, EventType[] deltaEventTypes, java.lang.String[] names)
          Analyze multiple event types and determine common property sets that form property groups.
protected static java.lang.String[] copyAndSort(java.lang.String[] input)
          Copy an sort the input array.
static EventPropertyGetter[] getGetters(EventType eventType, java.lang.String[] propertyNames)
          Return getters for property names.
static java.util.Map<java.lang.String,int[]> getGroupsPerProperty(PropertyGroupDesc[] groups)
          From a list of property groups that include multiple group numbers for each property, make a map of group numbers per property.
static PropertyAccessException getIllegalAccessException(java.lang.reflect.Field field, java.lang.IllegalAccessException e)
           
static PropertyAccessException getIllegalAccessException(java.lang.reflect.Method method, java.lang.IllegalAccessException e)
           
static PropertyAccessException getIllegalArgumentException(java.lang.reflect.Field field, java.lang.IllegalArgumentException e)
           
static PropertyAccessException getIllegalArgumentException(java.lang.reflect.Method method, java.lang.IllegalArgumentException e)
           
static PropertyAccessException getInvocationTargetException(java.lang.reflect.Method method, java.lang.reflect.InvocationTargetException e)
           
static java.lang.Object getKeys(EventBean theEvent, EventPropertyGetter[] keyPropertyGetters)
          Returns a multi-key for an event and key property getters
static PropertyAccessException getMismatchException(java.lang.reflect.Field field, java.lang.Object object, java.lang.ClassCastException e)
           
static PropertyAccessException getMismatchException(java.lang.reflect.Method method, java.lang.Object object, java.lang.ClassCastException e)
           
static java.util.Map<EventType,RevisionTypeDesc> getPerType(PropertyGroupDesc[] groups, java.lang.String[] changesetProperties, java.lang.String[] keyProperties)
          From a list of property groups that include contributing event types, build a map of contributing event types and their type descriptor.
protected static java.lang.String[] uniqueExclusiveSort(java.lang.String[] values, java.lang.String[] removeValues)
          Remove from values all removeValues and build a unique sorted result array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyUtility

public PropertyUtility()
Method Detail

getKeys

public static java.lang.Object getKeys(EventBean theEvent,
                                       EventPropertyGetter[] keyPropertyGetters)
Returns a multi-key for an event and key property getters

Parameters:
theEvent - to get keys for
keyPropertyGetters - getters to use
Returns:
key

getPerType

public static java.util.Map<EventType,RevisionTypeDesc> getPerType(PropertyGroupDesc[] groups,
                                                                   java.lang.String[] changesetProperties,
                                                                   java.lang.String[] keyProperties)
From a list of property groups that include contributing event types, build a map of contributing event types and their type descriptor.

Parameters:
groups - property groups
changesetProperties - properties that change between groups
keyProperties - key properties
Returns:
map of event type and type information

getGroupsPerProperty

public static java.util.Map<java.lang.String,int[]> getGroupsPerProperty(PropertyGroupDesc[] groups)
From a list of property groups that include multiple group numbers for each property, make a map of group numbers per property.

Parameters:
groups - property groups
Returns:
map of property name and group number

analyzeGroups

public static PropertyGroupDesc[] analyzeGroups(java.lang.String[] allProperties,
                                                EventType[] deltaEventTypes,
                                                java.lang.String[] names)
Analyze multiple event types and determine common property sets that form property groups.

Parameters:
allProperties - property names to look at
deltaEventTypes - all types contributing
names - names of properies
Returns:
groups

copyAndSort

protected static java.lang.String[] copyAndSort(java.lang.String[] input)
Copy an sort the input array.

Parameters:
input - to sort
Returns:
sorted copied array

getGetters

public static EventPropertyGetter[] getGetters(EventType eventType,
                                               java.lang.String[] propertyNames)
Return getters for property names.

Parameters:
eventType - type to get getters from
propertyNames - names to get
Returns:
getters

uniqueExclusiveSort

protected static java.lang.String[] uniqueExclusiveSort(java.lang.String[] values,
                                                        java.lang.String[] removeValues)
Remove from values all removeValues and build a unique sorted result array.

Parameters:
values - to consider
removeValues - values to remove from values
Returns:
sorted unique

getMismatchException

public static PropertyAccessException getMismatchException(java.lang.reflect.Method method,
                                                           java.lang.Object object,
                                                           java.lang.ClassCastException e)

getMismatchException

public static PropertyAccessException getMismatchException(java.lang.reflect.Field field,
                                                           java.lang.Object object,
                                                           java.lang.ClassCastException e)

getInvocationTargetException

public static PropertyAccessException getInvocationTargetException(java.lang.reflect.Method method,
                                                                   java.lang.reflect.InvocationTargetException e)

getIllegalAccessException

public static PropertyAccessException getIllegalAccessException(java.lang.reflect.Field field,
                                                                java.lang.IllegalAccessException e)

getIllegalArgumentException

public static PropertyAccessException getIllegalArgumentException(java.lang.reflect.Field field,
                                                                  java.lang.IllegalArgumentException e)

getIllegalAccessException

public static PropertyAccessException getIllegalAccessException(java.lang.reflect.Method method,
                                                                java.lang.IllegalAccessException e)

getIllegalArgumentException

public static PropertyAccessException getIllegalArgumentException(java.lang.reflect.Method method,
                                                                  java.lang.IllegalArgumentException e)

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com