Click or drag to resize

EventType Interface

This interface provides metadata on events.

The interface exposes events as organizations of named values. The contract is that any event in the system must have a name-based way of accessing sub-data within its event type. A simple example is a vanilla: the names can be property names, and those properties can have still more properties beneath them. Another example is a Map structure. Here string names can refer to data objects.

The interface presents an immutable view of events. There are no methods to change property values. Events by definition are an observation of a past occurrence or state change and may not be modified.

Information on the super-types (superclass and interfaces implemented by native events) is also available, for vanilla events as well as for Map event types that has supertypes.

Implementations provide metadata on the properties that an implementation itself provides.

Implementations also allow property expressions that may use nested, indexed, mapped or a combination of these as a syntax to access property types and values.

Implementations in addition may provide a means to access property values as event fragments, which are typed events themselves.

The order of property names depends on the underlying event type and may be platform-specific. When the underlying class is object-array the order of property names is always as-provided. When the underlying class is map the order of property names is defined only when LinkedHashMap was used to register the type. When the underlying class is bean the order of property names is depends on the order of the methods returned by reflection.

Namespace:  com.espertech.esper.common.client
Assembly:  NEsper.Common (in NEsper.Common.dll) Version: 8.0.0.0
Syntax
C#
public interface EventType

The EventType type exposes the following members.

Properties
  NameDescription
Public propertyDeepSuperTypes
Returns iterator over all super types to event type, going up the hierarchy and including all interfaces (and their extended interfaces) and superclasses as EventType instances.
Public propertyDeepSuperTypesCollection
Returns the set of deep supertypes
Public propertyEndTimestampPropertyName
Returns the property name of the property providing the end timestamp value.
Public propertyMetadata
Returns the type metadata.
Public propertyName
Returns the type name or null if no type name is assigned.

A type name is available for application-configured event types and for event types that represent events of a stream populated by insert-into.

No type name is available for anonymous statement-specific event type.

Public propertyPropertyDescriptors
Get property descriptors for the event type.

Note that the order of property names depends on the underlying event type.

The method does not return property information of inner or nested types.

Public propertyPropertyNames
Get the property names for the event type.

Note that the order of property names depends on the underlying event type.

The method does not return property names of inner or nested types.

Public propertyStartTimestampPropertyName
Returns the property name of the property providing the start timestamp value.
Public propertySuperTypes
Returns an array of event types that are super to this event type, from which this event type inherited event properties.

For vanilla instances underlying the event this method returns the event types for all superclasses extended by the vanilla and all interfaces implemented by the vanilla.

Public propertyUnderlyingType
Get the class that represents the vanilla type of the event type. Returns a vanilla event class if the schema represents a vanilla event type. Returns Dictionary is the schema represents a collection of values in a Dictionary.
Top
Methods
  NameDescription
Public methodGetFragmentType
Returns the event type of the fragment that is the value of a property name or property expression.

Returns null if the property name or property expression is not valid or does not return a fragment for the event type.

The provides a flag that indicates which properties provide fragment events.

This is useful for navigating properties that are itself events or other well-defined types that the underlying event representation may represent as an event type. It is up to each event representation to determine what properties can be represented as event types themselves.

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.

The underlying event representation may not support providing fragments or therefore fragment event types for any or all properties, in which case the method returns null.

Use the method to obtain a list of properties for which a fragment event type may be retrieved by this method.

Public methodGetGetter
Get the getter of an event property or property expression: Getters are useful when an application receives events of the same event type multiple times and requires fast access to an event property or nested, indexed or mapped property.

Returns null if the property name or property 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.
Public methodGetGetterIndexed
Get the getter of an event property that is a indexed event property: Getters are useful when an application receives events of the same event type multiple times and requires fast access to a indexed property.

Returns null if the property name is not valid against the event type or the property is not an indexed property.

The method takes a indexed property name (and not a property expression) as a parameter.

Public methodGetGetterMapped
Get the getter of an event property that is a mapped event property: Getters are useful when an application receives events of the same event type multiple times and requires fast access to a mapped property.

Returns null if the property name is not valid against the event type or the property is not a mapped property.

The method takes a mapped property name (and not a property expression) as a parameter.

Public methodGetPropertyDescriptor
Get the property descriptor for a given property of the event, or null if a property by that name was not found.

The property name parameter does accept a property expression. It therefore does not allow the indexed, mapped or nested property expression syntax and only returns the descriptor for the event type's known properties.

The method does not return property information of inner or nested types.

For returning a property descriptor for nested, indexed or mapped properties

use .
Public methodGetPropertyType
Get the type of an event property.

Returns null if the property name or property expression is not valid against the event type. Can also return null if a select-clause selects a constant null value.

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.

Returns unboxed (such as 'int.class') as well as boxed (System.Int32) type.

Public methodIsProperty
Check that the given property name or property expression is valid for this event type, ie. that the property exists on 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.
Top
See Also