Information Management IBM InfoSphere Master Data Management, Version 11.3

SQLJ-based queries

InfoSphere® MDM includes an SQLJ query implementation class, AbstractSQLJBObjQuery, to support SQLJ-based queries.

The core query implementations provided with the InfoSphere MDM product are based on JDBC. If you choose to use SQLJ-based database access instead of or together with JDBC, you should still base your queries on the BObjQuery interface.

The SQLJ query implementation class AbstractSQLJBObjQuery supports SQLJ-based queries. Instead of implementing the BObjQuery interface directly, the AbstractSQLJBObjQuery class extends AbstractBObjQuery class implementation to reuse most of the implementation code.

The AbstractSQLJBObjQuery class provides the base SQLJ query implementation. It contains the necessary logic to conduct SQLJ-based queries.
Note: When using the SQLJ implementation for new business object query classes, IBM® recommends that you extend the AbstractSQLJBObjQuery class.
The InfoSphere MDM SQLJ implementation includes the following supporting classes: SQLJCommand describes comprehensive information about a SQLJ executable statement. A SQLJCommand is executed by delegating the execution to its target, which is an ISQLJCommandFactory object. A unique name is used to identify each SQLJ executable statement in the ISQLJCommandFactory.

Each SQLJ statement should be defined in a method of its factory class that implements ISQLJCommandFactory. Upon request, the factory class is also responsible for executing each specific SQLJ statement. The result of an SQLJ statement is always converted to a ResultSet object. This enables the SQLJ implementation to reuse the same ResutSetProcessor classes to fetch query results as are used for JDBC.

Each SQLJ statement runs in a given connection context. If you are working in a multithreaded environment, do not use the default context; instead use the empty class, SQLJContext.

The following class diagram depicts the interfaces and abstract classes discussed in this topic, along with the implementation class that is used by the sampleMDM Query Connect transaction.

The method for introducing a SQLJ-based pluggable query is similar to creating a JDBC based business object query. Sample code is used in this section to provide a simplified illustration of the necessary steps. Actual code samples are provided with the InfoSphere MDM Query Connect Samples that are available for download from the InfoSphere MDM Support site.

In order to fully understand the procedures described in this section, you must read and be familiar with New pluggable business object queries.

Important: This class diagram includes no detailed information for the classes AbstractBObjQuery, TCRMPersonSearchResultSetProcessorSample, and TCRMResultSetProcessor. Only SQLJ-related information is presented in the SQLQuery class.
Class diagram showing the interfaces and abstract classes discussed in this topic


Last updated: 27 June 2014