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) |
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) |
public static QueryMapperRegistry get()
public 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 setcl
- class laoder used to discover mapperspublic void addMapper(QueryResultMapper<?> mapper)
public void removeMapper(String mapperName)
Copyright © 2001–2016 JBoss by Red Hat. All rights reserved.