com.espertech.esper.event.property
Class NestedProperty

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

public class NestedProperty
extends java.lang.Object
implements Property

This class represents a nested property, each nesting level made up of a property instance that can be of type indexed, mapped or simple itself.

The syntax for nested properties is as follows.

 a.n
 a[1].n
 a('1').n
 


Constructor Summary
NestedProperty(java.util.List<Property> properties)
          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 parentComplexProperty, 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)
           
 java.util.List<Property> getProperties()
          Returns the list of property instances making up the nesting levels.
 java.lang.String getPropertyNameAtomic()
           
 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 parentComplexProperty, 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NestedProperty

public NestedProperty(java.util.List<Property> properties)
Ctor.

Parameters:
properties - is the list of Property instances representing each nesting level
Method Detail

getProperties

public java.util.List<Property> getProperties()
Returns the list of property instances making up the nesting levels.

Returns:
list of Property instances

isDynamic

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

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

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 eventType,
                                                  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:
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.

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

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

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

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

getGetterDOM

public EventPropertyGetter getGetterDOM(SchemaElementComplex parentComplexProperty,
                                        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:
parentComplexProperty - 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 parentComplexProperty,
                                        EventAdapterService eventAdapterService)
Description copied from interface: Property
Returns the property type for use with DOM event representations.

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

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

getPropertyNameAtomic

public java.lang.String getPropertyNameAtomic()
Specified by:
getPropertyNameAtomic in interface Property

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