use of com.linkedin.thirdeye.datalayer.util.Predicate in project pinot by linkedin.
the class DashboardConfigManagerImpl method findByName.
@Override
public DashboardConfigDTO findByName(String name) {
Predicate predicate = Predicate.EQ("name", name);
List<DashboardConfigBean> list = genericPojoDao.get(predicate, DashboardConfigBean.class);
DashboardConfigDTO result = null;
if (CollectionUtils.isNotEmpty(list)) {
result = MODEL_MAPPER.map(list.get(0), DashboardConfigDTO.class);
}
return result;
}
use of com.linkedin.thirdeye.datalayer.util.Predicate in project pinot by linkedin.
the class DashboardConfigManagerImpl method findByDataset.
@Override
public List<DashboardConfigDTO> findByDataset(String dataset) {
Predicate predicate = Predicate.EQ("dataset", dataset);
List<DashboardConfigBean> list = genericPojoDao.get(predicate, DashboardConfigBean.class);
List<DashboardConfigDTO> result = new ArrayList<>();
for (DashboardConfigBean abstractBean : list) {
DashboardConfigDTO dto = MODEL_MAPPER.map(abstractBean, DashboardConfigDTO.class);
result.add(dto);
}
return result;
}
use of com.linkedin.thirdeye.datalayer.util.Predicate in project pinot by linkedin.
the class DashboardConfigManagerImpl method findActiveByDataset.
@Override
public List<DashboardConfigDTO> findActiveByDataset(String dataset) {
Predicate datasetPredicate = Predicate.EQ("dataset", dataset);
Predicate activePredicate = Predicate.EQ("active", true);
List<DashboardConfigBean> list = genericPojoDao.get(Predicate.AND(datasetPredicate, activePredicate), DashboardConfigBean.class);
List<DashboardConfigDTO> result = new ArrayList<>();
for (DashboardConfigBean abstractBean : list) {
DashboardConfigDTO dto = MODEL_MAPPER.map(abstractBean, DashboardConfigDTO.class);
result.add(dto);
}
return result;
}
use of com.linkedin.thirdeye.datalayer.util.Predicate in project pinot by linkedin.
the class DataCompletenessConfigManagerImpl method findAllInTimeRange.
@Override
public List<DataCompletenessConfigDTO> findAllInTimeRange(long startTime, long endTime) {
Predicate timePredicate = Predicate.AND(Predicate.GE("dateToCheckInMS", startTime), Predicate.LT("dateToCheckInMS", endTime));
List<DataCompletenessConfigBean> list = genericPojoDao.get(timePredicate, DataCompletenessConfigBean.class);
return convertListOfBeanToDTO(list);
}
use of com.linkedin.thirdeye.datalayer.util.Predicate in project pinot by linkedin.
the class DataCompletenessConfigManagerImpl method findByDatasetAndDateMS.
@Override
public DataCompletenessConfigDTO findByDatasetAndDateMS(String dataset, Long dateToCheckInMS) {
Predicate predicate = Predicate.AND(Predicate.EQ("dataset", dataset), Predicate.EQ("dateToCheckInMS", dateToCheckInMS));
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;
}
Aggregations