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): 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)");
For a list of EPL keywords, see the Apama EPL Reference, Lexical Elements, Keywords.
Copyright © Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its Subsidiaries and or/its Affiliates and/or their licensors.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.