public interface QueryTransformer
extends org.apache.commons.collections.Transformer
interface
for Transformer
that executes a query
and Transformer.transform(Object)
s parameters into query result.Modifier and Type | Method and Description |
---|---|
Map<String,?> |
getFieldMapping()
Map from query param name to field name or Transformer that will act on input to get param value.
|
String |
getQuery()
Query to process.
|
boolean |
isExpectSingleResult()
|
boolean |
isParamAsSingleInput()
If true, will take whole input to transformer as a single parameter and pass it in query.
|
void |
setExpectSingleResult(boolean expectSingleResult)
|
void |
setFieldMapping(Map<String,?> fieldMapping)
Map from query param name to field name or Transformer that will act on input to get param value.
|
void |
setParamAsSingleInput(boolean paramAsSingleInput)
If true, will take whole input to transformer as a single parameter and pass it in query.
|
void |
setQuery(String query)
Query to process.
|
void setQuery(String query)
query
- String getQuery()
void setExpectSingleResult(boolean expectSingleResult)
true
, query will return only one result, which will be returned without being wrapped in a List
else return results in a List
expectSingleResult
- boolean isExpectSingleResult()
true
, query will return only one result, which will be returned without being wrapped in a List
else return results in a List
void setParamAsSingleInput(boolean paramAsSingleInput)
paramAsSingleInput
- boolean isParamAsSingleInput()
Map<String,?> getFieldMapping()
Copyright © 2018. All rights reserved.