Package org.nuclos.api.provider
Class DatasourceProvider
java.lang.Object
org.nuclos.api.provider.DatasourceProvider
DatasourceProvider
provides methods for executing datasource-queries
This Class is usually used in Rule-classes and allows API access only
- Author:
- Matthias Reichart
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic DatasourceResult
createResult
(List<Object[]> rows, List<DatasourceColumn> columns) static DatasourceColumn
createResultColumn
(String name, Class clz) static DatasourceResult
run
(Class<? extends Datasource> datasourceClass) This methods executes a query for a givenDatasource
-Object.static DatasourceResult
This methods executes a query for a givenDatasource
-Object.void
setDatasourceService
(DatasourceService service)
-
Constructor Details
-
DatasourceProvider
DatasourceProvider()
-
-
Method Details
-
setDatasourceService
-
run
public static DatasourceResult run(Class<? extends Datasource> datasourceClass) throws BusinessException This methods executes a query for a givenDatasource
-Object. The returning NuclosResult contains all found results. There are no parameter passed to the query.- Parameters:
datasourceClass
- Class<? extends Datasource> datasourceClass- Returns:
- NuclosResult
- Throws:
BusinessException
-
run
public static DatasourceResult run(Class<? extends Datasource> datasourceClass, Map<String, Object> params) throws BusinessExceptionThis methods executes a query for a givenDatasource
-Object. The returning NuclosResult contains all found results. The parameters are passed to the query.- Parameters:
datasourceClass
- Class<? extends Datasource> datasourceClassparams
- Map<String, Object> params- Returns:
- NuclosResult
- Throws:
BusinessException
-
createResult
-
createResultColumn
-