use of com.linkedin.thirdeye.datalayer.util.Predicate 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);
}
use of com.linkedin.thirdeye.datalayer.util.Predicate 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);
}
use of com.linkedin.thirdeye.datalayer.util.Predicate in project pinot by linkedin.
the class DataCompletenessConfigManagerImpl method findByDatasetAndDateSDF.
@Override
public DataCompletenessConfigDTO findByDatasetAndDateSDF(String dataset, String dateToCheckInSDF) {
Predicate predicate = Predicate.AND(Predicate.EQ("dataset", dataset), Predicate.EQ("dateToCheckInSDF", dateToCheckInSDF));
List<DataCompletenessConfigBean> list = genericPojoDao.get(predicate, DataCompletenessConfigBean.class);
DataCompletenessConfigDTO result = null;
if (CollectionUtils.isNotEmpty(list)) {
result = MODEL_MAPPER.map(list.get(0), DataCompletenessConfigDTO.class);
}
return result;
}
use of com.linkedin.thirdeye.datalayer.util.Predicate 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;
}
use of com.linkedin.thirdeye.datalayer.util.Predicate in project pinot by linkedin.
the class AnomalyFunctionManagerImpl method findAllActiveFunctions.
/*
* (non-Javadoc)
*
* @see com.linkedin.thirdeye.datalayer.bao.IAnomalyFunctionManager# findAllActiveFunctions()
*/
@Override
public List<AnomalyFunctionDTO> findAllActiveFunctions() {
Predicate predicate = Predicate.EQ("active", true);
List<AnomalyFunctionBean> list = genericPojoDao.get(predicate, AnomalyFunctionBean.class);
List<AnomalyFunctionDTO> result = new ArrayList<>();
for (AnomalyFunctionBean abstractBean : list) {
AnomalyFunctionDTO dto = MODEL_MAPPER.map(abstractBean, AnomalyFunctionDTO.class);
result.add(dto);
}
return result;
}
Aggregations