[#4201] - DomainSchemaBuilder.java lines 312 and 315

Category:
Feature request
Priority:
Normal
Status:
New
Project: Severity:
Minor
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:

Lines 312 and 315 of DomainSchemaBuilder.java for JasperServer pro release 3.1.5 Build: 20090528_2100 hard code "jdbcTable" and "jdbcQuery" respectively.

Please refactor this section of code to allow DomainSchema and DomainSchemaBuilder objects to be configurable for non-JDBC datasources.

hartsock's picture
Joined: Apr 3 2009 - 7:12am
Last seen: 14 years 2 months ago

1 Comment:

#1

For example this Groovy Code could handle the problem by allowing for dynamic type resolution at run-time. Note: I registered fooTable and fooQuery with the semanticLayerFactory and have appropriate query generators registered for them.

String dataSetType = table.getProperties().get(MetaDataConstants.PROP_DATA_SET_TYPE);
boolean isQueryBased = dataSetType.endsWith("Query");
def joinDataSet = semanticLayerFactory.createDataSet(dataSetType);

if (!isQueryBased) {
joinDataSet.setTableName(tableName);
} else {
joinDataSet.setQuery(query);
}

Feedback