Search in sources :

Example 1 with DatasetConfigBean

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

the class DatasetConfigManagerImpl method findByDataset.

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

Example 2 with DatasetConfigBean

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

the class DatasetConfigManagerImpl method findActiveRequiresCompletenessCheck.

@Override
public List<DatasetConfigDTO> findActiveRequiresCompletenessCheck() {
    Predicate activePredicate = Predicate.EQ("active", true);
    Predicate completenessPredicate = Predicate.EQ("requiresCompletenessCheck", true);
    List<DatasetConfigBean> list = genericPojoDao.get(Predicate.AND(activePredicate, completenessPredicate), DatasetConfigBean.class);
    List<DatasetConfigDTO> results = new ArrayList<>();
    for (DatasetConfigBean abstractBean : list) {
        DatasetConfigDTO result = MODEL_MAPPER.map(abstractBean, DatasetConfigDTO.class);
        results.add(result);
    }
    return results;
}
Also used : DatasetConfigDTO(com.linkedin.thirdeye.datalayer.dto.DatasetConfigDTO) ArrayList(java.util.ArrayList) DatasetConfigBean(com.linkedin.thirdeye.datalayer.pojo.DatasetConfigBean) Predicate(com.linkedin.thirdeye.datalayer.util.Predicate)

Example 3 with DatasetConfigBean

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

the class DatasetConfigManagerImpl method findActive.

@Override
public List<DatasetConfigDTO> findActive() {
    Predicate activePredicate = Predicate.EQ("active", true);
    List<DatasetConfigBean> list = genericPojoDao.get(activePredicate, DatasetConfigBean.class);
    List<DatasetConfigDTO> results = new ArrayList<>();
    for (DatasetConfigBean abstractBean : list) {
        DatasetConfigDTO result = MODEL_MAPPER.map(abstractBean, DatasetConfigDTO.class);
        results.add(result);
    }
    return results;
}
Also used : DatasetConfigDTO(com.linkedin.thirdeye.datalayer.dto.DatasetConfigDTO) ArrayList(java.util.ArrayList) DatasetConfigBean(com.linkedin.thirdeye.datalayer.pojo.DatasetConfigBean) Predicate(com.linkedin.thirdeye.datalayer.util.Predicate)

Aggregations

DatasetConfigDTO (com.linkedin.thirdeye.datalayer.dto.DatasetConfigDTO)3 DatasetConfigBean (com.linkedin.thirdeye.datalayer.pojo.DatasetConfigBean)3 Predicate (com.linkedin.thirdeye.datalayer.util.Predicate)3 ArrayList (java.util.ArrayList)2