@CompileStatic class DefaultMangoQuery extends Object
Default implementation of MangoQuery. Setup as spring bean that is used by all the repos
| Type | Name and description |
|---|---|
String |
criteriaKeyName |
| Type Params | Return Type | Name and description |
|---|---|---|
|
DetachedCriteria |
buildCriteria(Class domainClass, Map criteria = [:], Closure closure = null)Builds detached criteria for repository's domain based on mango criteria language and additional criteria |
|
Map |
countTotals(Class domainClass, Map params = [:], List<String> sums, Closure closure = null)Calculates sums for specified properties in enities query restricted by mango criteria |
|
Map<String, Map> |
parseParams(Map params)returns a Map with a criteria key and a pager key containing maps for those. |
|
List |
query(Class domainClass, Map params = [:], Closure closure = null)List of entities restricted by mango map and criteria closure |
|
List |
query(DetachedCriteria criteria, Map pagerParams = [:], Closure closure = null)List of entities restricted by mango map and criteria closure |
Builds detached criteria for repository's domain based on mango criteria language and additional criteria
params - mango language criteria mapclosure - additional restriction for criteriaCalculates sums for specified properties in enities query restricted by mango criteria
params - mango language criteria mapsums - query of properties names that sums should be calculated forclosure - additional restriction for criteriareturns a Map with a criteria key and a pager key containing maps for those.
List of entities restricted by mango map and criteria closure
params - mango language criteria mapclosure - additional restriction for criteriaList of entities restricted by mango map and criteria closure
params - mango language criteria mapclosure - additional restriction for criteria