com.espertech.esper.event
Class EventTypeUtility

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

public class EventTypeUtility
extends java.lang.Object


Nested Class Summary
static class EventTypeUtility.TimestampPropertyDesc
           
 
Constructor Summary
EventTypeUtility()
           
 
Method Summary
static java.lang.Object buildType(ColumnDesc column, EngineImportService engineImportService)
           
static java.util.LinkedHashMap<java.lang.String,java.lang.Object> buildType(java.util.List<ColumnDesc> columns, EventAdapterService eventAdapterService, java.util.Set<java.lang.String> copyFrom, EngineImportService engineImportService)
           
static java.util.Map<java.lang.String,java.lang.Object> compileMapTypeProperties(java.util.Map<java.lang.String,java.lang.Object> typing, EventAdapterService eventAdapterService)
          Determine among the Map-type properties which properties are Bean-type event type names, rewrites these as Class-type instead so that they are configured as native property and do not require wrapping, but may require unwrapping.
static EventType createNonVariantType(boolean isAnonymous, CreateSchemaDesc spec, java.lang.annotation.Annotation[] annotations, ConfigurationInformation configSnapshot, EventAdapterService eventAdapterService, EngineImportService engineImportService)
           
static WriteablePropertyDescriptor findWritable(java.lang.String propertyName, java.util.Set<WriteablePropertyDescriptor> writables)
           
static EventPropertyGetter getNestableGetter(java.lang.String propertyName, java.util.Map<java.lang.String,PropertySetDescriptorItem> propertyGetters, java.util.Map<java.lang.String,EventPropertyGetter> propertyGetterCache, java.util.Map<java.lang.String,java.lang.Object> nestableTypes, EventAdapterService eventAdapterService, EventTypeNestableGetterFactory factory)
           
static PropertySetDescriptor getNestableProperties(java.util.Map<java.lang.String,java.lang.Object> propertiesToAdd, EventAdapterService eventAdapterService, EventTypeNestableGetterFactory factory, EventType[] optionalSuperTypes)
           
static EventPropertyDescriptor getNestablePropertyDescriptor(EventType target, java.util.Deque<Property> stack)
           
static EventPropertyDescriptor getNestablePropertyDescriptor(EventType target, java.lang.String propertyName)
           
static java.lang.Class getNestablePropertyType(java.lang.String propertyName, java.util.Map<java.lang.String,PropertySetDescriptorItem> simplePropertyTypes, java.util.Map<java.lang.String,java.lang.Object> nestableTypes, EventAdapterService eventAdapterService)
           
static java.lang.String getPropertyRemoveArray(java.lang.String name)
          Returns the property name without the array type extension, if present.
static boolean isPropertyArray(java.lang.String name)
          Returns true if the name indicates that the type is an array type.
static boolean isTypeOrSubTypeOf(EventType candidate, EventType superType)
           
static boolean isTypeOrSubTypeOf(java.lang.String typeName, EventType sameTypeOrSubtype)
           
static EventTypeUtility.TimestampPropertyDesc validatedDetermineTimestampProps(EventType type, java.lang.String startProposed, java.lang.String endProposed, EventType[] superTypes)
           
static java.util.LinkedHashMap<java.lang.String,java.lang.Object> validateObjectArrayDef(java.lang.String[] propertyNames, java.lang.Object[] propertyTypes)
           
static void validateTimestampProperties(EventType eventType, java.lang.String startTimestampProperty, java.lang.String endTimestampProperty)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventTypeUtility

public EventTypeUtility()
Method Detail

getNestablePropertyDescriptor

public static EventPropertyDescriptor getNestablePropertyDescriptor(EventType target,
                                                                    java.lang.String propertyName)

getNestablePropertyDescriptor

public static EventPropertyDescriptor getNestablePropertyDescriptor(EventType target,
                                                                    java.util.Deque<Property> stack)

buildType

public static java.util.LinkedHashMap<java.lang.String,java.lang.Object> buildType(java.util.List<ColumnDesc> columns,
                                                                                   EventAdapterService eventAdapterService,
                                                                                   java.util.Set<java.lang.String> copyFrom,
                                                                                   EngineImportService engineImportService)
                                                                            throws ExprValidationException
Throws:
ExprValidationException

buildType

public static java.lang.Object buildType(ColumnDesc column,
                                         EngineImportService engineImportService)
                                  throws ExprValidationException
Throws:
ExprValidationException

validateTimestampProperties

public static void validateTimestampProperties(EventType eventType,
                                               java.lang.String startTimestampProperty,
                                               java.lang.String endTimestampProperty)
                                        throws ConfigurationException
Throws:
ConfigurationException

isTypeOrSubTypeOf

public static boolean isTypeOrSubTypeOf(EventType candidate,
                                        EventType superType)

compileMapTypeProperties

public static java.util.Map<java.lang.String,java.lang.Object> compileMapTypeProperties(java.util.Map<java.lang.String,java.lang.Object> typing,
                                                                                        EventAdapterService eventAdapterService)
Determine among the Map-type properties which properties are Bean-type event type names, rewrites these as Class-type instead so that they are configured as native property and do not require wrapping, but may require unwrapping.

Parameters:
typing - properties of map type
eventAdapterService - event adapter service
Returns:
compiled properties, same as original unless Bean-type event type names were specified.

isPropertyArray

public static boolean isPropertyArray(java.lang.String name)
Returns true if the name indicates that the type is an array type.

Parameters:
name - the property name
Returns:
true if array type

getPropertyRemoveArray

public static java.lang.String getPropertyRemoveArray(java.lang.String name)
Returns the property name without the array type extension, if present.

Parameters:
name - property name
Returns:
property name with removed array extension name

getNestableProperties

public static PropertySetDescriptor getNestableProperties(java.util.Map<java.lang.String,java.lang.Object> propertiesToAdd,
                                                          EventAdapterService eventAdapterService,
                                                          EventTypeNestableGetterFactory factory,
                                                          EventType[] optionalSuperTypes)
                                                   throws EPException
Throws:
EPException

getNestablePropertyType

public static java.lang.Class getNestablePropertyType(java.lang.String propertyName,
                                                      java.util.Map<java.lang.String,PropertySetDescriptorItem> simplePropertyTypes,
                                                      java.util.Map<java.lang.String,java.lang.Object> nestableTypes,
                                                      EventAdapterService eventAdapterService)

getNestableGetter

public static EventPropertyGetter getNestableGetter(java.lang.String propertyName,
                                                    java.util.Map<java.lang.String,PropertySetDescriptorItem> propertyGetters,
                                                    java.util.Map<java.lang.String,EventPropertyGetter> propertyGetterCache,
                                                    java.util.Map<java.lang.String,java.lang.Object> nestableTypes,
                                                    EventAdapterService eventAdapterService,
                                                    EventTypeNestableGetterFactory factory)

validateObjectArrayDef

public static java.util.LinkedHashMap<java.lang.String,java.lang.Object> validateObjectArrayDef(java.lang.String[] propertyNames,
                                                                                                java.lang.Object[] propertyTypes)

createNonVariantType

public static EventType createNonVariantType(boolean isAnonymous,
                                             CreateSchemaDesc spec,
                                             java.lang.annotation.Annotation[] annotations,
                                             ConfigurationInformation configSnapshot,
                                             EventAdapterService eventAdapterService,
                                             EngineImportService engineImportService)
                                      throws ExprValidationException
Throws:
ExprValidationException

findWritable

public static WriteablePropertyDescriptor findWritable(java.lang.String propertyName,
                                                       java.util.Set<WriteablePropertyDescriptor> writables)

validatedDetermineTimestampProps

public static EventTypeUtility.TimestampPropertyDesc validatedDetermineTimestampProps(EventType type,
                                                                                      java.lang.String startProposed,
                                                                                      java.lang.String endProposed,
                                                                                      EventType[] superTypes)
                                                                               throws EPException
Throws:
EPException

isTypeOrSubTypeOf

public static boolean isTypeOrSubTypeOf(java.lang.String typeName,
                                        EventType sameTypeOrSubtype)

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