Interface EventBean

All Known Subinterfaces:
AvroBackedBean, EventBeanSPI, MappedEventBean, ObjectArrayBackedEventBean
All Known Implementing Classes:
BeanEventBean, JsonEventBean, MapEventBean, NaturalEventBean, ObjectArrayEventBean, VariantEventBean, WrapperEventBean, XMLEventBean

public interface EventBean
Interface for event representation. All events have an EventType. Events also usually have one or more event properties. This interface allows the querying of event type, event property values and the underlying event object.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final EPTypeClass
    Type class of EventBean.class
    static final EPTypeClass
    Type class of EventBean[].class
    static final EPTypeClass
    Type class of EventBean[][].class
  • Method Summary

    Modifier and Type
    Method
    Description
    get(String propertyExpression)
    Returns the value of an event property for the given property name or property expression.
    Return the EventType instance that describes the set of properties available for this event.
    getFragment(String propertyExpression)
    Returns event beans or array of event bean for a property name or property expression.
    Get the underlying data object to this event wrapper.
  • Field Details

    • EPTYPE

      static final EPTypeClass EPTYPE
      Type class of EventBean.class
    • EPTYPEARRAY

      static final EPTypeClass EPTYPEARRAY
      Type class of EventBean[].class
    • EPTYPEARRAYARRAY

      static final EPTypeClass EPTYPEARRAYARRAY
      Type class of EventBean[][].class
  • Method Details

    • getEventType

      EventType getEventType()
      Return the EventType instance that describes the set of properties available for this event.
      Returns:
      event type
    • get

      Object get(String propertyExpression) throws PropertyAccessException
      Returns the value of an event property for the given property name or property expression.

      Returns null if the property value is null. Throws an exception if the expression is not valid against the event type.

      The method takes a property name or property expression as a parameter. Property expressions may include indexed properties via the syntax "name[index]", mapped properties via the syntax "name('key')", nested properties via the syntax "outer.inner" or combinations thereof.

      Parameters:
      propertyExpression - - name or expression of the property whose value is to be retrieved
      Returns:
      the value of a property with the specified name.
      Throws:
      PropertyAccessException - - if there is no property of the specified name, or the property cannot be accessed
    • getUnderlying

      Object getUnderlying()
      Get the underlying data object to this event wrapper.
      Returns:
      underlying data object, usually either a Map or a Java bean instance.
    • getFragment

      Object getFragment(String propertyExpression) throws PropertyAccessException
      Returns event beans or array of event bean for a property name or property expression.

      For use with properties whose value is itself an event or whose value can be represented as an event by the underlying event representation.

      The EventType of the event bean instance(s) returned by this method can be determined by EventType.getFragmentType(String). Use EventPropertyDescriptor to obtain a list of properties that return fragments from an event type.

      Returns null if the property value is null or the property value cannot be represented as a fragment by the underlying representation.

      The method takes a property name or property expression as a parameter. Property expressions may include indexed properties via the syntax "name[index]", mapped properties via the syntax "name('key')", nested properties via the syntax "outer.inner" or combinations thereof.

      Parameters:
      propertyExpression - - name or expression of the property whose value is to be presented as an EventBean or array of EventBean
      Returns:
      the value of a property as an EventBean or array of EventBean
      Throws:
      PropertyAccessException - - if there is no property of the specified name, or the property cannot be accessed