Open topic with navigation

TIBCO® Patterns 6.1.2

# 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.

Subtopics

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO® Patterns

Copyright © 2010-2025. Cloud Software Group, Inc. All Rights Reserved.