public class DefaultHavingApiGenerator extends Object implements HavingGenerator
| Constructor and Description |
|---|
DefaultHavingApiGenerator(ConfigurationLoader loader)
Constructor.
|
DefaultHavingApiGenerator(Map<String,LogicalMetric> metricDictionary)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Map<LogicalMetric,Set<ApiHaving>> |
apply(String havingQuery,
Set<LogicalMetric> logicalMetrics)
Generates having objects based on the having query in the api request.
|
HavingGenerator |
withMetricDictionary(Map<String,LogicalMetric> metricDictionary)
Rebuild this having generator with a custom metric dictionary.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitandThenpublic DefaultHavingApiGenerator(ConfigurationLoader loader)
Uses the globally scoped set of metrics to resolve having clauses.
loader - Configuration loader that connects resource dictionaries with the loader.public DefaultHavingApiGenerator(Map<String,LogicalMetric> metricDictionary)
metricDictionary - Dictionary of metrics for generating APIspublic Map<LogicalMetric,Set<ApiHaving>> apply(String havingQuery, Set<LogicalMetric> logicalMetrics) throws BadApiRequestException
apply in interface BiFunction<String,Set<LogicalMetric>,Map<LogicalMetric,Set<ApiHaving>>>havingQuery - Expects a URL having query String in the format:
(dimension name)-(operation)[(value or comma separated values)]?logicalMetrics - The logical metrics used in this queryBadApiRequestException - if the having query string does not match required syntax.public HavingGenerator withMetricDictionary(Map<String,LogicalMetric> metricDictionary)
metricDictionary - An alternate dictionary.Copyright © 2016–2018 Yahoo! Inc.. All rights reserved.