Search in sources :

Example 1 with IngraphMetricConfigBean

use of com.linkedin.thirdeye.datalayer.pojo.IngraphMetricConfigBean in project pinot by linkedin.

the class IngraphMetricConfigManagerImpl method findByDashboard.

@Override
public List<IngraphMetricConfigDTO> findByDashboard(String dashboardName) {
    Predicate predicate = Predicate.EQ("dashboardName", dashboardName);
    List<IngraphMetricConfigBean> list = genericPojoDao.get(predicate, IngraphMetricConfigBean.class);
    List<IngraphMetricConfigDTO> result = new ArrayList<>();
    for (IngraphMetricConfigBean abstractBean : list) {
        IngraphMetricConfigDTO dto = MODEL_MAPPER.map(abstractBean, IngraphMetricConfigDTO.class);
        result.add(dto);
    }
    return result;
}
Also used : IngraphMetricConfigBean(com.linkedin.thirdeye.datalayer.pojo.IngraphMetricConfigBean) ArrayList(java.util.ArrayList) IngraphMetricConfigDTO(com.linkedin.thirdeye.datalayer.dto.IngraphMetricConfigDTO) Predicate(com.linkedin.thirdeye.datalayer.util.Predicate)

Example 2 with IngraphMetricConfigBean

use of com.linkedin.thirdeye.datalayer.pojo.IngraphMetricConfigBean in project pinot by linkedin.

the class IngraphMetricConfigManagerImpl method findByDashboardAndMetricName.

@Override
public IngraphMetricConfigDTO findByDashboardAndMetricName(String dashboardName, String metricName) {
    Predicate dashboardPredicate = Predicate.EQ("dashboardName", dashboardName);
    Predicate metricPredicate = Predicate.EQ("metricName", metricName);
    List<IngraphMetricConfigBean> list = genericPojoDao.get(Predicate.AND(dashboardPredicate, metricPredicate), IngraphMetricConfigBean.class);
    IngraphMetricConfigDTO result = null;
    if (CollectionUtils.isNotEmpty(list)) {
        result = MODEL_MAPPER.map(list.get(0), IngraphMetricConfigDTO.class);
    }
    return result;
}
Also used : IngraphMetricConfigBean(com.linkedin.thirdeye.datalayer.pojo.IngraphMetricConfigBean) IngraphMetricConfigDTO(com.linkedin.thirdeye.datalayer.dto.IngraphMetricConfigDTO) Predicate(com.linkedin.thirdeye.datalayer.util.Predicate)

Example 3 with IngraphMetricConfigBean

use of com.linkedin.thirdeye.datalayer.pojo.IngraphMetricConfigBean in project pinot by linkedin.

the class IngraphMetricConfigManagerImpl method findByRrdName.

@Override
public IngraphMetricConfigDTO findByRrdName(String rrdName) {
    Predicate dashboardPredicate = Predicate.EQ("rrdName", rrdName);
    List<IngraphMetricConfigBean> list = genericPojoDao.get(dashboardPredicate, IngraphMetricConfigBean.class);
    IngraphMetricConfigDTO result = null;
    if (CollectionUtils.isNotEmpty(list)) {
        result = MODEL_MAPPER.map(list.get(0), IngraphMetricConfigDTO.class);
    }
    return result;
}
Also used : IngraphMetricConfigBean(com.linkedin.thirdeye.datalayer.pojo.IngraphMetricConfigBean) IngraphMetricConfigDTO(com.linkedin.thirdeye.datalayer.dto.IngraphMetricConfigDTO) Predicate(com.linkedin.thirdeye.datalayer.util.Predicate)

Aggregations

IngraphMetricConfigDTO (com.linkedin.thirdeye.datalayer.dto.IngraphMetricConfigDTO)3 IngraphMetricConfigBean (com.linkedin.thirdeye.datalayer.pojo.IngraphMetricConfigBean)3 Predicate (com.linkedin.thirdeye.datalayer.util.Predicate)3 ArrayList (java.util.ArrayList)1