toolkit.db.api
Interface SQLNameAnalyser


public interface SQLNameAnalyser

SQLNameAnalyser lets users map names of tables/columns by themselves at runtime. Usually, JReport maps mapping names of tables/columns to sql Names itself when trying to create a SQL statement. Those sql names are fetched from catalog. But if users provide an implementation of this interface, JReport will call it to create SQL statement at runtime, giving more flexibility to let users run one report on different data sources. Note: in order to use Class.forName() to create a new Class for the implementation of SQLNameAnalyser, any implemented class must have a default constructor.


Method Summary
 void getSQLMapInfo(SQLMapInfo info, ParameterInfo[] params)
          Gets SQLMapInfo used to create SQL statement for report.
 

Method Detail

getSQLMapInfo

void getSQLMapInfo(SQLMapInfo info,
                   ParameterInfo[] params)
Gets SQLMapInfo used to create SQL statement for report.

Parameters:
info - An in-out parameter. The original SQLMapInfo stores all mapping names of tables/columns, but all sql names are "". Users can get the two Hashtables, modify it and return it back.
params - An array of ParameterInfo indicating how to map mapping names to sql names.