Event Types Specified as JavaBean or Java Class

2-4 Oracle Complex Event Processing Developers Guide ■ Section 2.2, Creating an Oracle CEP Event Type as a JavaBean ■ Section 2.4.1, How to Create an Oracle CEP Event Type as a Java Class Manually ■ Section 2.8, Sharing Event Types Between Application Bundles ■ Oracle Java Data Cartridge in the Oracle Complex Event Processing CQL Language Reference

2.1.3.2 Event Types Specified as java.util.Map

When you specify the properties of the event type declaratively in the EPN assembly file as a java.util.Map, you may use any Java type for its properties. However, you specify the event type as either: ■ The fully qualified name of a Java class that must conform to the same rules as Class.forName and must be available in the applications class-loader. ■ A Java primitive for example, int or float. You may specify an array by appending the characters [] to the event type name. Example 2–2 shows how to use these types: Example 2–2 Specifying Java Data Types for java.util.Map Event Type Properties wlevs:event-type-repository wlevs:event-type type-name=AnotherEvent wlevs:property entry key=name value=java.lang.String entry key=employeeId value=java.lang.Integer[] entry key=salary value=float entry key=projectIds value=short[] wlevs:property wlevs:event-type wlevs:event-type-repository For more information, see Section 2.5.1, How to Create an Oracle CEP Event Type as a java.util.Map .

2.1.3.3 Event Types Specified as a Tuple

When you specify the properties of the event type declaratively in the EPN assembly file as a tuple, you may use any CQL primitive types or Java types. Example 2–3 shows the use of different types: Example 2–3 Specifying com.bea.welvs.ede.api.Type Data Types for Tuple Event Type Properties wlevs:event-type-repository wlevs:event-type type-name=SimpleEvent wlevs:properties wlevs:property name=id type=char length=1000 wlevs:property name=msg type=char wlevs:property name=count type=double wlevs:property name=time_stamp type=timestamp wlevs:properties wlevs:event-type ... wlevs:event-type-repository For more information, see Section 2.3, Creating an Oracle CEP Event Type 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.