com.espertech.esper.event.property
Class IndexedProperty

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

public class IndexedProperty
extends PropertyBase

Represents an indexed property or array property, ie. an 'value' property with read method getValue(int index) or a 'array' property via read method getArray() returning an array.


Field Summary
 
Fields inherited from class com.espertech.esper.event.property.PropertyBase
propertyNameAtomic
 
Constructor Summary
IndexedProperty(java.lang.String propertyName)
           
IndexedProperty(java.lang.String propertyName, int index)
          Ctor.
 
Method Summary
 EventPropertyGetterAndIndexed 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.
 MapEventPropertyGetterAndIndexed getGetterMap(java.util.Map optionalMapPropTypes, EventAdapterService eventAdapterService)
          Returns the getter-method for use with Map event representations.
 ObjectArrayEventPropertyGetterAndIndexed 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()
          Returns index for indexed access.
static java.lang.Integer getIndex(java.lang.String propertyName)
          Returns the index number for an indexed property expression.
 java.lang.Class getPropertyType(BeanEventType eventType, EventAdapterService eventAdapterService)
          Returns the property type.
 GenericPropertyDesc getPropertyTypeGeneric(BeanEventType eventType, 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

IndexedProperty

public IndexedProperty(java.lang.String propertyName)

IndexedProperty

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

Parameters:
propertyName - is the property name
index - is the index to use to access the property value
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.

Returns:
array of atomic names in a property expression

getIndex

public int getIndex()
Returns index for indexed access.

Returns:
index value

getGetter

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

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

getPropertyTypeGeneric

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

Parameters:
eventType - is the event type representing the JavaBean
eventAdapterService - for event adapters
Returns:
type and generic descriptor

getPropertyType

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

Parameters:
eventType - is the event type representing the JavaBean
eventAdapterService - for event adapters
Returns:
property type class

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.

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 MapEventPropertyGetterAndIndexed getGetterMap(java.util.Map optionalMapPropTypes,
                                                     EventAdapterService eventAdapterService)
Description copied from interface: Property
Returns the getter-method for use with Map event representations.

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

toPropertyEPL

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

Parameters:
writer - to write to

getGetterDOM

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

Returns:
getter

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.

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.

Parameters:
complexProperty - a element-within-element type definition
eventAdapterService - for resolving further element event types if defined
Returns:
property type

getIndex

public static java.lang.Integer getIndex(java.lang.String propertyName)
Returns the index number for an indexed property expression.

Parameters:
propertyName - property expression
Returns:
index

getGetterObjectArray

public ObjectArrayEventPropertyGetterAndIndexed getGetterObjectArray(java.util.Map<java.lang.String,java.lang.Integer> indexPerProperty,
                                                                     java.util.Map<java.lang.String,java.lang.Object> nestableTypes,
                                                                     EventAdapterService eventAdapterService)

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