public interface QueryMacroHandler
The implementation must be a managed bean with "prototype" scope.
Modifier and Type | Method and Description |
---|---|
java.lang.String |
expandMacro(java.lang.String queryString)
Replaces macro with real JPQL code.
|
java.util.Map<java.lang.String,java.lang.Object> |
getParams() |
java.lang.String |
replaceQueryParams(java.lang.String queryString,
java.util.Map<java.lang.String,java.lang.Object> params)
Replaces param names in
queryString with its values from the params parameter. |
void |
setQueryParams(java.util.Map<java.lang.String,java.lang.Object> namedParameters)
Sets parameters of the expanded query to the macro handler.
|
java.lang.String expandMacro(java.lang.String queryString)
queryString
- source query stringvoid setQueryParams(java.util.Map<java.lang.String,java.lang.Object> namedParameters)
namedParameters
- all named parameters of the expanded queryjava.util.Map<java.lang.String,java.lang.Object> getParams()
java.lang.String replaceQueryParams(java.lang.String queryString, java.util.Map<java.lang.String,java.lang.Object> params)
queryString
with its values from the params
parameter.
If macro is not found, the source query string is returned.