public class QueryMapperRegistry extends Object
org.jbpm.services.api.query.QueryResultMapper| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
logger |
| Modifier | Constructor and Description |
|---|---|
protected |
QueryMapperRegistry() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMapper(QueryResultMapper<?> mapper)
Adds a new query results mapper
|
List<String> |
discoverAndAddMappers(ClassLoader cl)
Discovers and adds all
QueryResultMappers to the known set. |
static QueryMapperRegistry |
get()
Returns instance of the registry that is already populated with known mappers.
|
QueryResultMapper<?> |
mapperFor(String name,
Map<String,String> columnMapping)
Returns mapper for given name if found.
|
void |
removeMapper(String mapperName)
Removes a query results mapper.
|
public static QueryMapperRegistry get()
QueryMapperRegistry registrypublic QueryResultMapper<?> mapperFor(String name, Map<String,String> columnMapping)
name - unique name that mapper is bound tocolumnMapping - provides column mapping (name to type) that can be
shipped to mapper for improved transformation - can be null (accepted types: string, long, integer, date, double)QueryResultMapper if foundIllegalArgumentException - in case there is no mapper found with given namepublic List<String> discoverAndAddMappers(ClassLoader cl)
QueryResultMappers to the known set.cl - class laoder used to discover mapperspublic void addMapper(QueryResultMapper<?> mapper)
mapper - public void removeMapper(String mapperName)
mapperName - Copyright © 2001–2020 JBoss by Red Hat. All rights reserved.