com.espertech.esper.client
Class EventPropertyDescriptor

java.lang.Object
  extended by com.espertech.esper.client.EventPropertyDescriptor

public class EventPropertyDescriptor
extends java.lang.Object

Descriptor for event property names, property types and access metadata.


Constructor Summary
EventPropertyDescriptor(java.lang.String propertyName, java.lang.Class propertyType, java.lang.Class propertyComponentType, boolean requiresIndex, boolean requiresMapkey, boolean indexed, boolean mapped, boolean fragment)
          Ctor.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.Class getPropertyComponentType()
          Returns the component type.
 java.lang.String getPropertyName()
          Returns the property name.
 java.lang.Class getPropertyType()
          Returns the property underlying type.
 int hashCode()
           
 boolean isFragment()
          Returns true to indicate that the property value can itself be represented as an EventBean and that the property type can be represented as an EventType.
 boolean isIndexed()
          Returns true for indexed properties, returns false for all other property styles.
 boolean isMapped()
          Returns true for mapped properties, returns false for all other property styles.
 boolean isRequiresIndex()
          Returns true to indicate that the property is an indexed property and requires an index to access elements of the indexed property.
 boolean isRequiresMapkey()
          Returns true to indicate that the property is a mapped property and requires a map key to access elements of the mapped property.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EventPropertyDescriptor

public EventPropertyDescriptor(java.lang.String propertyName,
                               java.lang.Class propertyType,
                               java.lang.Class propertyComponentType,
                               boolean requiresIndex,
                               boolean requiresMapkey,
                               boolean indexed,
                               boolean mapped,
                               boolean fragment)
Ctor.

Parameters:
propertyName - name of the property
propertyType - the property type
propertyComponentType - is the component type if the property is an indexed property
requiresIndex - true if the access to property value access requires an integer index value
requiresMapkey - true if the access to property value access requires a string map key
indexed - true if the property is an indexed property, i.e. type is an array or the property value access requires an integer index value
mapped - true if the property is a mapped property, i.e. type is an Map or the property value access requires an string map key
fragment - true if the property value can be represented as an EventBean and property type can be represented as an EventType
Method Detail

getPropertyName

public java.lang.String getPropertyName()
Returns the property name.

Returns:
property name

getPropertyType

public java.lang.Class getPropertyType()
Returns the property underlying type.

Note that a null values is possible as null values can be selected.

Returns:
underlying property type

getPropertyComponentType

public java.lang.Class getPropertyComponentType()
Returns the component type.

Returns:
component type

isRequiresIndex

public boolean isRequiresIndex()
Returns true to indicate that the property is an indexed property and requires an index to access elements of the indexed property. Returns false to indicate that the property is not an indexed property or does not require an index for property value access.

For JavaBean-style events, a getter-method that takes a single integer parameter is considered an indexed property that requires an index for access.

A getter-method that returns an array is considered an index property but does not require an index for access.

Returns:
true to indicate that property value access requires an index value

isRequiresMapkey

public boolean isRequiresMapkey()
Returns true to indicate that the property is a mapped property and requires a map key to access elements of the mapped property. Returns false to indicate that the property is not a mapped property or does not require a map key for property value access.

For JavaBean-style events, a getter-method that takes a single string parameter is considered a mapped property that requires a map key for access.

A getter-method that returns a Map is considered a mapped property but does not require a map key for access.

Returns:
true to indicate that property value access requires an index value

isIndexed

public boolean isIndexed()
Returns true for indexed properties, returns false for all other property styles.

An indexed property is a property returning an array value or a getter-method taking a single integer parameter.

Returns:
indicator whether this property is an index property

isMapped

public boolean isMapped()
Returns true for mapped properties, returns false for all other property styles.

A mapped property is a property returning a Map value or a getter-method taking a single string (key) parameter.

Returns:
indicator whether this property is a mapped property

isFragment

public boolean isFragment()
Returns true to indicate that the property value can itself be represented as an EventBean and that the property type can be represented as an EventType.

Returns:
indicator whether property is itself a complex data structure representable as a nested EventType

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

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