Data Loader based on DataLoader Interface

While the default introspection-based Data Loader works well with the classes that match the defined convention, the DataLoader interface provides a more flexible way to define the procedure to load objects. The design and runtime of the data source works in the same way as an introspection-based Data Loader, except that the DataLoader interface is used for meta-data discovery and runtime execution without relying on introspection.

The DataLoader interface defines the following four methods:

public String[] getRequests()
This method should return a list of request names. This corresponds to the methods that return a collection of objects in the introspection-based Data Loader.

public Class getRequestOutput(String request)
This method returns the object type for each request. It must handle all request names returned from getRequests().

public Class getRequestParameter(String request)
This method returns the parameters for each request, similar to the getRequestOutput() method.

public Collection execute(String request, Object params, XNodePath condition)
This method executes the requests. It optionally handles the user defined conditions in the XNodePath. If any conditions defined in the XNodePath can be handled by the execute() method, they should be handled internally (for example, as a condition to an object oriented database query). If a condition cannot be handled by the execute() method, it should raise a ConditionNotSupportedException. The query engine will call the execute() method again without the condition, and will process the conditions as part of the post-processing.

<< Data Loader based on Introspection © 1996-2013 InetSoft Technology Corporation (v11.5) Data Loader based on DataLoader2 interface >>