Event Types Specified as java.util.Map Event Types Specified as a Tuple

Overview of Oracle CEP Events 2-5

2.1.3.4 Event Types for use With a Database Table Source

When you specify the properties of an event type as any of a JavaBean, Java class, java.util.Map, or tuple for use with a relational database table, you must observe the following additional JDBC type restrictions: ■ Table 10–2, EPN Assembly File event-type Element Property Attributes ■ Table 10–3, SQL Column Types and Oracle CEP Type Equivalents For more information, see: ■ Section 10.3, Configuring an Oracle CQL Processor Table Source ■ Section 2.1.3, Event Type Data Types

2.1.3.5 Event Types for use With the csvgen Adapter

When you specify the properties of an event type as any of a JavaBean, Java class, java.util.Map, or tuple for use with the csvgen adapter, you may only use the data types that Table 2–1 describes. For more information, see: ■ Section 25.4, Creating a Data Feed File ■ Section 2.1.3.1, Event Types Specified as JavaBean or Java Class ■ Section 2.1.3.3, Event Types Specified as a Tuple

2.1.4 Creating Oracle CEP Event Types

Event types define the properties of the events that are handled by Oracle CEP applications. Adapters receive incoming events from different event sources, such as JMS, or financial market data feeds. You must define these events by an event type before a processor is able to handle them. You then use these event types in the adapter and POJO Java code, as well as in the Oracle CQL and EPL rules you associate with the processors. This section describes: ■ Section 2.2, Creating an Oracle CEP Event Type as a JavaBean ■ Section 2.3, Creating an Oracle CEP Event Type as a Tuple ■ Section 2.4, Creating an Oracle CEP Event Type as a Java Class ■ Section 2.5, Creating an Oracle CEP Event Type as a java.util.Map Table 2–1 csvgen Adapter Types Type Usage char Single or multiple character values. Use for both char and java.lang.String values. Optionally, you may used the length attribute to specify the maximum length of the char value as Example 2–3 shows for the property with name id. The default length is 256 characters. If you need more than 256 characters you should specify an adequate length. int Numeric values in the range that java.lang.Integer specifies. long Numeric values in the range that java.lang.Long specifies. double Numeric values in the range that java.lang.Double specifies. 2-6 Oracle Complex Event Processing Developers Guide ■ Section 2.6, Using an Event Type Builder Factory ■ Section 2.7, Accessing the Event Type Repository ■ Section 2.8, Sharing Event Types Between Application Bundles For more information, see Section 2.1, Oracle CEP Event Types .

2.2 Creating an Oracle CEP Event Type as a JavaBean

You can create and register an Oracle CEP event type as a JavaBean. This is the preferred approach. Follow standard JavaBeans programming guidelines. See the JavaBeans Tutorial at http:java.sun.comdocsbookstutorialjavabeans for additional details. Oracle recommends that, if possible, you make your event type JavaBeans immutable to improve performance. For more information, see Section 2.1.1, Event Type Instantiation and Immutability . When you design your event, you must restrict your design to the even data types that Section 2.1.3.1, Event Types Specified as JavaBean or Java Class describes. This topic describes: ■ Section 2.2.1, How to Create an Oracle CEP Event Type as a JavaBean Using the Event Type Repository Editor ■ Section 2.2.2, How to Create an Oracle CEP Event Type as a JavaBean Manually

2.2.1 How to Create an Oracle CEP Event Type as a JavaBean Using the Event Type Repository Editor

This procedure describes how to create and register an Oracle CEP event type as a JavaBean using the Oracle CEP IDE for Eclipse event type repository editor. For more information about the Oracle CEP IDE for Eclipse, see Example 3, Overview of the Oracle CEP IDE for Eclipse . Alternatively, you can create and register your event type as a JavaBean manually see Section 2.2.2, How to Create an Oracle CEP Event Type as a JavaBean Manually . To create an Oracle CEP event type as a Java bean using the event type repository editor: 1. Create a JavaBean class to represent your event type. Follow standard JavaBeans programming guidelines. See the JavaBeans Tutorial at http:java.sun.comdocsbookstutorialjavabeans for additional details. Oracle recommends that, if possible, you make your event type JavaBeans immutable to improve performance. For more information, see Section 2.1.1, Event Type Instantiation and Immutability . When you design your event, you must restrict your design to the even data types that Section 2.1.3.1, Event Types Specified as JavaBean or Java Class describes. Example 2–5 shows the MarketEvent which is implemented by the com.bea.wlevs.example.algotrading.event.MarketEvent class.