Search in sources :

Example 1 with DataCompletenessConfigBean

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

the class DataCompletenessConfigManagerImpl method convertListOfBeanToDTO.

private List<DataCompletenessConfigDTO> convertListOfBeanToDTO(List<DataCompletenessConfigBean> list) {
    List<DataCompletenessConfigDTO> results = new ArrayList<>();
    for (DataCompletenessConfigBean abstractBean : list) {
        DataCompletenessConfigDTO dto = MODEL_MAPPER.map(abstractBean, DataCompletenessConfigDTO.class);
        results.add(dto);
    }
    return results;
}
Also used : DataCompletenessConfigDTO(com.linkedin.thirdeye.datalayer.dto.DataCompletenessConfigDTO) ArrayList(java.util.ArrayList) DataCompletenessConfigBean(com.linkedin.thirdeye.datalayer.pojo.DataCompletenessConfigBean)

Example 2 with DataCompletenessConfigBean

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

the class DataCompletenessConfigManagerImpl method findAllByTimeOlderThan.

@Override
public List<DataCompletenessConfigDTO> findAllByTimeOlderThan(long time) {
    Predicate predicate = Predicate.LT("dateToCheckInMS", time);
    List<DataCompletenessConfigBean> list = genericPojoDao.get(predicate, DataCompletenessConfigBean.class);
    return convertListOfBeanToDTO(list);
}
Also used : DataCompletenessConfigBean(com.linkedin.thirdeye.datalayer.pojo.DataCompletenessConfigBean) Predicate(com.linkedin.thirdeye.datalayer.util.Predicate)

Example 3 with DataCompletenessConfigBean

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

the class DataCompletenessConfigManagerImpl method findAllByDatasetAndInTimeRangeAndPercentCompleteGT.

@Override
public List<DataCompletenessConfigDTO> findAllByDatasetAndInTimeRangeAndPercentCompleteGT(String dataset, long startTime, long endTime, double percentComplete) {
    Predicate timePredicate = Predicate.AND(Predicate.GE("dateToCheckInMS", startTime), Predicate.LT("dateToCheckInMS", endTime));
    Predicate datasetPredicate = Predicate.EQ("dataset", dataset);
    Predicate percentCompletePrediate = Predicate.GT("percentComplete", percentComplete);
    List<DataCompletenessConfigBean> list = genericPojoDao.get(Predicate.AND(datasetPredicate, timePredicate, percentCompletePrediate), DataCompletenessConfigBean.class);
    return convertListOfBeanToDTO(list);
}
Also used : DataCompletenessConfigBean(com.linkedin.thirdeye.datalayer.pojo.DataCompletenessConfigBean) Predicate(com.linkedin.thirdeye.datalayer.util.Predicate)

Example 4 with DataCompletenessConfigBean

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

the class DataCompletenessConfigManagerImpl method findAllByTimeOlderThanAndStatus.

@Override
public List<DataCompletenessConfigDTO> findAllByTimeOlderThanAndStatus(long time, boolean dataComplete) {
    Predicate datePredicate = Predicate.LT("dateToCheckInMS", time);
    Predicate dataCompletePredicate = Predicate.EQ("dataComplete", dataComplete);
    List<DataCompletenessConfigBean> list = genericPojoDao.get(Predicate.AND(datePredicate, dataCompletePredicate), DataCompletenessConfigBean.class);
    return convertListOfBeanToDTO(list);
}
Also used : DataCompletenessConfigBean(com.linkedin.thirdeye.datalayer.pojo.DataCompletenessConfigBean) Predicate(com.linkedin.thirdeye.datalayer.util.Predicate)

Example 5 with DataCompletenessConfigBean

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

the class DataCompletenessConfigManagerImpl method findAllByDataset.

@Override
public List<DataCompletenessConfigDTO> findAllByDataset(String dataset) {
    Predicate predicate = Predicate.EQ("dataset", dataset);
    List<DataCompletenessConfigBean> list = genericPojoDao.get(predicate, DataCompletenessConfigBean.class);
    return convertListOfBeanToDTO(list);
}
Also used : DataCompletenessConfigBean(com.linkedin.thirdeye.datalayer.pojo.DataCompletenessConfigBean) Predicate(com.linkedin.thirdeye.datalayer.util.Predicate)

Aggregations

DataCompletenessConfigBean (com.linkedin.thirdeye.datalayer.pojo.DataCompletenessConfigBean)10 Predicate (com.linkedin.thirdeye.datalayer.util.Predicate)9 DataCompletenessConfigDTO (com.linkedin.thirdeye.datalayer.dto.DataCompletenessConfigDTO)3 ArrayList (java.util.ArrayList)1