com.espertech.esper.event.property
Class MappedProperty

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

public class MappedProperty
extends PropertyBase

Represents a mapped 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
MappedProperty(java.lang.String propertyName)
           
MappedProperty(java.lang.String propertyName, java.lang.String key)
          Ctor.
 
Method Summary
 EventPropertyGetterAndMapped 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.
 MapEventPropertyGetterAndMapped getGetterMap(java.util.Map optionalMapPropTypes, EventAdapterService eventAdapterService)
          Returns the getter-method for use with Map event representations.
 ObjectArrayEventPropertyGetterAndMapped getGetterObjectArray(java.util.Map<java.lang.String,java.lang.Integer> indexPerProperty, java.util.Map<java.lang.String,java.lang.Object> nestableTypes, EventAdapterService eventAdapterService)
           
 java.lang.String getKey()
          Returns the key value for mapped access.
 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

MappedProperty

public MappedProperty(java.lang.String propertyName)

MappedProperty

public MappedProperty(java.lang.String propertyName,
                      java.lang.String key)
Ctor.

Parameters:
propertyName - is the property name of the mapped property
key - is the key value to access the mapped property
Method Detail

getKey

public java.lang.String getKey()
Returns the key value for mapped access.

Returns:
key value

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

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.

getGetter

public EventPropertyGetterAndMapped 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

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

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

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 MapEventPropertyGetterAndMapped 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(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

getGetterDOM

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

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

getGetterObjectArray

public ObjectArrayEventPropertyGetterAndMapped 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