Class EventPropertyDescriptor

java.lang.Object
com.espertech.esper.common.client.EventPropertyDescriptor

public class EventPropertyDescriptor extends Object
Descriptor for event property names, property types and access metadata.
  • Constructor Details

    • EventPropertyDescriptor

      public EventPropertyDescriptor(String propertyName, EPType propertyType, boolean requiresIndex, boolean requiresMapkey, boolean indexed, boolean mapped, boolean fragment)
      Ctor.
      Parameters:
      propertyName - name of the property
      propertyType - the property type
      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 Details

    • getPropertyName

      public String getPropertyName()
      Returns the property name.
      Returns:
      property name
    • getPropertyType

      public Class getPropertyType()
      Returns the property underlying type.

      Note that a null values is possible as null values can be selected. Use getPropertyEPType() for access to type parameters.

      Returns:
      underlying property type
    • getPropertyEPType

      public EPType getPropertyEPType()
      Returns the property underlying type.

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

      Returns:
      underlying property type
    • getPropertyComponentType

      public Class getPropertyComponentType()
      Returns the component type, if applicable. This is applicable only to arrays and collections, queues and iterators. Returns null if not applicable.
      Returns:
      component type
    • getPropertyComponentEPType

      public EPTypeClass getPropertyComponentEPType()
      Returns the component type, if applicable. This is applicable only to arrays and collections, queues and iterators. Returns null if not applicable.
      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(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object