An Introduction to the Query Builder Platform
The ANetricsQueryBuilder and ANetricsCompoundQueryBuilder classes provide a standard interface for query builders, making them portable across applications. They also simplify the process of writing a query builder by taking care of routine bookkeeping operations. However, you must still write the code, compile it, and link it into your application. The Query Builder Platform eliminates the need to write code. Instead, a configuration file is used to define the query. From the configuration file, the platform can either generate the code for you, or build queries directly.
Details about the format of the configuration file used to define a query can be found in the QueryDef.xsd schema file located in the query_builder/schema directory. The customer1.xml sample configuration file is provided in the query_builder/samples directory.
The Query Builder Platform provides an extension of each of the query builder abstract classes in the Java API; GeneralQueryBuilder extends ANetricsQueryBuilder, and GeneralCompoundQueryBuilder extends ANetricsCompoundQueryBuilder. GeneralQueryBuilder and GeneralCompoundQueryBuilder read a configuration file that completely defines how to build the query. Because GeneralQueryBuilder and GeneralCompoundQueryBuilder are extensions of the abstract classes, they can be plugged into any application designed to use one of the abstract classes as its query builder. The query used by the application is then defined from a configuration file read in at run time, rather than from compiled code that must be linked into the application.
The platform provides additional functionality. A tool is provided that allows query configurations to be verified and tested. A set of interfaces and abstract classes provide hooks that allow GeneralCompoundQueryBuilder and GeneralQueryBuilder to be integrated into almost any application.