com.espertech.esper.event.property
Class DynamicIndexedProperty

java.lang.Object
  extended by com.espertech.esper.event.property.PropertyBase
      extended by com.espertech.esper.event.property.DynamicIndexedProperty
All Implemented Interfaces:
DynamicProperty, Property

public class DynamicIndexedProperty
extends PropertyBase
implements DynamicProperty

Represents a dynamic indexed property of a given name.

Dynamic properties always exist, have an Object type and are resolved to a method during runtime.


Field Summary
 
Fields inherited from class com.espertech.esper.event.property.PropertyBase
propertyNameAtomic
 
Constructor Summary
DynamicIndexedProperty(java.lang.String propertyName, int index)
          Ctor.
 
Method Summary
 EventPropertyGetter getGetter(BeanEventType eventType, EventAdapterService eventAdapterService)
          Returns value getter for the property of an event of the given event type.
 EventPropertyGetter getGetterDOM()
          Returns the getter-method for use with XML DOM event representations.
 EventPropertyGetter getGetterDOM(SchemaElementComplex complexProperty, EventAdapterService eventAdapterService, BaseXMLEventType eventType, java.lang.String propertyExpression)
          Returns the getter-method for use with XML DOM event representations.
 MapEventPropertyGetter getGetterMap(java.util.Map optionalMapPropTypes, EventAdapterService eventAdapterService)
          Returns the getter-method for use with Map event representations.
 ObjectArrayEventPropertyGetter getGetterObjectArray(java.util.Map<java.lang.String,java.lang.Integer> indexPerProperty, java.util.Map<java.lang.String,java.lang.Object> nestableTypes, EventAdapterService eventAdapterService)
           
 int getIndex()
           
 java.lang.Class getPropertyType(BeanEventType eventType, EventAdapterService eventAdapterService)
          Returns the property type.
 GenericPropertyDesc getPropertyTypeGeneric(BeanEventType beanEventType, EventAdapterService eventAdapterService)
          Returns the property type plus its generic type parameter, if any.
 java.lang.Class getPropertyTypeMap(java.util.Map optionalMapPropTypes, EventAdapterService eventAdapterService)
          Returns the property type for use with Map event representations.
 SchemaItem getPropertyTypeSchema(SchemaElementComplex complexProperty, EventAdapterService eventAdapterService)
          Returns the property type for use with DOM event representations.
 boolean isDynamic()
          Returns true for dynamic properties.
 java.lang.String[] toPropertyArray()
          Return a String-array of atomic property names.
 void toPropertyEPL(java.io.StringWriter writer)
          Write the EPL-representation of the property.
 
Methods inherited from class com.espertech.esper.event.property.PropertyBase
getPropertyNameAtomic
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicIndexedProperty

public DynamicIndexedProperty(java.lang.String propertyName,
                              int index)
Ctor.

Parameters:
propertyName - is the property name
index - is the index of the array or indexed property
Method Detail

isDynamic

public boolean isDynamic()
Description copied from interface: Property
Returns true for dynamic properties.

Specified by:
isDynamic in interface Property
Overrides:
isDynamic in class PropertyBase
Returns:
false for not-dynamic properties, true for dynamic properties.

toPropertyArray

public java.lang.String[] toPropertyArray()
Description copied from interface: Property
Return a String-array of atomic property names.

Specified by:
toPropertyArray in interface Property
Returns:
array of atomic names in a property expression

getGetter

public EventPropertyGetter getGetter(BeanEventType eventType,
                                     EventAdapterService eventAdapterService)
Description copied from interface: Property
Returns value getter for the property of an event of the given event type.

Specified by:
getGetter in interface Property
Parameters:
eventType - is the type of event to make a getter for
eventAdapterService - factory for event beans and event types
Returns:
fast property value getter for property

getPropertyType

public java.lang.Class getPropertyType(BeanEventType eventType,
                                       EventAdapterService eventAdapterService)
Description copied from interface: Property
Returns the property type.

Specified by:
getPropertyType in interface Property
Parameters:
eventType - is the event type representing the JavaBean
eventAdapterService - for event adapters
Returns:
property type class

getPropertyTypeGeneric

public GenericPropertyDesc getPropertyTypeGeneric(BeanEventType beanEventType,
                                                  EventAdapterService eventAdapterService)
Description copied from interface: Property
Returns the property type plus its generic type parameter, if any.

Specified by:
getPropertyTypeGeneric in interface Property
Parameters:
beanEventType - is the event type representing the JavaBean
eventAdapterService - for event adapters
Returns:
type and generic descriptor

getPropertyTypeMap

public java.lang.Class getPropertyTypeMap(java.util.Map optionalMapPropTypes,
                                          EventAdapterService eventAdapterService)
Description copied from interface: Property
Returns the property type for use with Map event representations.

Specified by:
getPropertyTypeMap in interface Property
Parameters:
optionalMapPropTypes - a map-within-map type definition, if supplied, or null if not supplied
eventAdapterService - for resolving further map event types that are property types
Returns:
property type @param optionalMapPropTypes

getGetterMap

public MapEventPropertyGetter getGetterMap(java.util.Map optionalMapPropTypes,
                                           EventAdapterService eventAdapterService)
Description copied from interface: Property
Returns the getter-method for use with Map event representations.

Specified by:
getGetterMap in interface Property
Parameters:
optionalMapPropTypes - a map-within-map type definition, if supplied, or null if not supplied
eventAdapterService - for resolving further map event types that are property types
Returns:
getter for maps

getGetterObjectArray

public ObjectArrayEventPropertyGetter getGetterObjectArray(java.util.Map<java.lang.String,java.lang.Integer> indexPerProperty,
                                                           java.util.Map<java.lang.String,java.lang.Object> nestableTypes,
                                                           EventAdapterService eventAdapterService)
Specified by:
getGetterObjectArray in interface Property

toPropertyEPL

public void toPropertyEPL(java.io.StringWriter writer)
Description copied from interface: Property
Write the EPL-representation of the property.

Specified by:
toPropertyEPL in interface Property
Parameters:
writer - to write to

getGetterDOM

public EventPropertyGetter getGetterDOM(SchemaElementComplex complexProperty,
                                        EventAdapterService eventAdapterService,
                                        BaseXMLEventType eventType,
                                        java.lang.String propertyExpression)
Description copied from interface: Property
Returns the getter-method for use with XML DOM event representations.

Specified by:
getGetterDOM in interface Property
Parameters:
complexProperty - a element-within-element type definition
eventAdapterService - for resolving or creating further event types that are property types
eventType - the event type
propertyExpression - the full property expression
Returns:
getter

getPropertyTypeSchema

public SchemaItem getPropertyTypeSchema(SchemaElementComplex complexProperty,
                                        EventAdapterService eventAdapterService)
Description copied from interface: Property
Returns the property type for use with DOM event representations.

Specified by:
getPropertyTypeSchema in interface Property
Parameters:
complexProperty - a element-within-element type definition
eventAdapterService - for resolving further element event types if defined
Returns:
property type

getGetterDOM

public EventPropertyGetter getGetterDOM()
Description copied from interface: Property
Returns the getter-method for use with XML DOM event representations.

Specified by:
getGetterDOM in interface Property
Returns:
getter

getIndex

public int getIndex()

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