Apama Documentation : Developing Apama Applications : Developing Apama Applications in Java : Overview of Apama JMon Applications : Using EPL keywords as identifiers in JMon applications
Using EPL keywords as identifiers in JMon applications
If you use EPL keywords as event name or field identifiers, then in the following situations you must escape such identifiers by preceding them with hash (#) symbols:
*You refer to the JMon identifier in EPL code: You must escape the identifier in the EPL code that contains the reference.
*You refer to the JMon identifier in a JMon event expression: You must escape the identifier in that JMon event expression.
For example, consider the following Java code:
class test extends Event {
   int id;
   float price;
   int integer;
}
Now suppose you want to write the following EPL code:
on all test(id=7) as f {
   print f.toString();
   emit f;
}
No escaping is necessary. However, suppose you want to write this EPL code:
print f.integer.toString();
In this case, you must escape integer as follows:
print f.#integer.toString();
Likewise, you must escape integer in the following JMon event expression:
new EventExpression("all test(#integer > 5)");
See also Keywords.
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback