* @throws SAXException if there is a parsing error.
*/
protected void doneParsing() throws SAXException
{
super.doneParsing();
final SubReport report = (SubReport) getElement();
for (int i = 0; i < importParameters.size(); i++)
{
final ParameterMappingReadHandler handler =
(ParameterMappingReadHandler) importParameters.get(i);
report.addInputParameter(handler.getName(), handler.getAlias());
}
for (int i = 0; i < exportParameters.size(); i++)
{
final ParameterMappingReadHandler handler =
(ParameterMappingReadHandler) exportParameters.get(i);
report.addExportParameter(handler.getAlias(), handler.getName());
}
if (queryReadHandler == null)
{
throw new ParseException("Query is not specified.", getLocator());
}
final String result = queryReadHandler.getResult();
report.setQuery(result);
}