Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Complex Event Processing
11g Release 1 (11.1.1.4.0)

E14303-04
FRAMES    NO FRAMES
DETAIL:  FIELD | CONSTR | METHOD


com.bea.wlevs.ede.api
Interface EventType

All Known Subinterfaces:
JavaBeanEventType, MapEventType, TupleEventType

public interface EventType

This interface provides event type metadata for 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 Java bean: 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.

Information on the super-types (superclass and interfaces implemented by JavaBean events) is also available. Supertypes generally exclude Java language interfaces and types.


Method Summary
 java.lang.Object createEvent()
          Creates an event object for this event type.
 EventBuilder.Factory getEventBuilderFactory()
          Deprecated. As of OCEP 11.1.1.10, replaced by createEvent
 EventProperty[] getProperties()
          Returns all event properties for this event type.
 EventProperty getProperty(java.lang.String propertyName)
          Returns event property named propertyName.
 int getPropertyLength(java.lang.String property)
          Returns the length of the property, if it is of array or String type and the length definition is known.
 java.lang.String[] getPropertyNames()
          Get all valid property names for the event type.
 java.lang.Class getPropertyType(java.lang.String property)
          Get the type of an event property as returned by the "getter" method for that property.
 java.lang.Object getPropertyValue(java.lang.Object underlying, java.lang.String property)
          Retrieves property value from an event object of this event type.
 EventType[] getSuperTypes()
          Returns an array of event types that are super to this event type, from which this event type inherited event properties.
 java.lang.String getTypeName()
          Returns the registered event type name associated with this EventType.
 java.lang.Class getUnderlyingType()
          Get the class that represents the Java type of the event type.
 boolean isProperty(java.lang.String property)
          Check that the given property name is valid for this event type, ie. that is exists in the event type.

 

Method Detail

getTypeName

public java.lang.String getTypeName()
Returns the registered event type name associated with this EventType.
Returns:
event type name

getPropertyNames

public java.lang.String[] getPropertyNames()
Get all valid property names for the event type.
Returns:
A string array containing the property names of this typed event data object.

getPropertyValue

public java.lang.Object getPropertyValue(java.lang.Object underlying,
                                         java.lang.String property)
                                  throws UnsupportedPropertyException
Retrieves property value from an event object of this event type.
Parameters:
underlying - event object from which to retrieve value
property - property name whose value is to be retrieved
Returns:
value of property for underlying event object
Throws:
UnsupportedPropertyException - if the property name specified is not valid

getPropertyType

public java.lang.Class getPropertyType(java.lang.String property)
Get the type of an event property as returned by the "getter" method for that property. Returns unboxed (such as 'int.class') as well as boxed (java.lang.Integer) type. Returns null if the property name is not valid.
Parameters:
property - is the property name
Returns:
type of the property, the unboxed or the boxed type.

getPropertyLength

public int getPropertyLength(java.lang.String property)
                      throws UnsupportedPropertyException
Returns the length of the property, if it is of array or String type and the length definition is known. This may be used in creating database schema corresponding to the event type.
Parameters:
property - the name of the property
Returns:
length of the property if the property is of array of String type and the length is known; -1 otherwise.
Throws:
UnsupportedPropertyException - if the property name specified is not valid

getProperty

public EventProperty getProperty(java.lang.String propertyName)
                          throws UnsupportedPropertyException
Returns event property named propertyName.
Parameters:
propertyName - event property name
Returns:
EventProperty event property
Throws:
UnsupportedPropertyException - if propertyName is not found.

getProperties

public EventProperty[] getProperties()
Returns all event properties for this event type. If event has no property, it returns an empty array.
Returns:
EventProperty [] event properties

getUnderlyingType

public java.lang.Class getUnderlyingType()
Get the class that represents the Java type of the event type. Returns a Java bean event class if the schema represents a Java bean event type. Returns java.util.Map if the schema represents a collection of values in a Map.
Returns:
type of the event object

getSuperTypes

public EventType[] getSuperTypes()
Returns an array of event types that are super to this event type, from which this event type inherited event properties.

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

Returns:
an array of event types

isProperty

public boolean isProperty(java.lang.String property)
Check that the given property name is valid for this event type, ie. that is exists in the event type.
Parameters:
property - is the property to check
Returns:
true if exists, false if not

getEventBuilderFactory

public EventBuilder.Factory getEventBuilderFactory()
Deprecated. As of OCEP 11.1.1.10, replaced by createEvent
Returns EventBuilder.Factory which may be used to manufacture event objects of this event type.
Returns:
factory to manufacture events of this type

createEvent

public java.lang.Object createEvent()
Creates an event object for this event type. After event is created, it can be set using EventProperty.setValue()
Returns:
Object event object

Overview  Package   Class   Use  Tree  Deprecated  Index  Help 
Copyright © 2007, 2011 Oracle and/or its affiliates. All rights reserved.
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD