1. A method comprising: receiving, by a computer system, a query expressed in an event processing language, the query including a reference to a complex type implemented in another language distinct from the event processing language; and compiling, by the computer system, the query by: retrieving metadata pertaining to the complex type from information stored in a data cartridge for the complex type without requiring definition of a function interface for the complex type using data types that are defined in the event processing language; and generating, based on the metadata, executable instructions for executing the query; wherein the reference to the complex type within the query specifies both (a) a class identifier of a class written in said language distinct from the event processing language and (b) a method identifier of a particular method of the class; wherein the class written in said language distinct from the event processing language includes a plurality of methods that are invocable as complex types referenced in queries expressed in the event processing language; and wherein the particular method is one of the plurality of methods.
4. The method of claim 1 , wherein: the another language distinct from the event processing language is Java, and wherein the complex type is a Java class.