use of com.linkedin.thirdeye.datalayer.util.Predicate in project pinot by linkedin.
the class RawAnomalyResultManagerImpl method findAllByTimeAndFunctionId.
public List<RawAnomalyResultDTO> findAllByTimeAndFunctionId(long startTime, long endTime, long functionId) {
Predicate startTimePredicate;
startTimePredicate = Predicate.AND(Predicate.GE("startTime", startTime), Predicate.LE("startTime", endTime));
Predicate endTimeTimePredicate;
endTimeTimePredicate = Predicate.AND(Predicate.GE("endTime", startTime), Predicate.LE("endTime", endTime));
;
Predicate functionIdPredicate = Predicate.EQ("functionId", functionId);
Predicate finalPredicate = Predicate.AND(functionIdPredicate, Predicate.OR(endTimeTimePredicate, startTimePredicate));
return findByPredicate(finalPredicate);
}
use of com.linkedin.thirdeye.datalayer.util.Predicate in project pinot by linkedin.
the class AutotuneConfigManagerImpl method findAllByFunctionId.
@Override
public List<AutotuneConfigDTO> findAllByFunctionId(long functionId) {
Predicate predicate = Predicate.EQ(FUNCTION_ID, functionId);
List<AutotuneConfigBean> list = genericPojoDao.get(predicate, AutotuneConfigBean.class);
return beansToDTOs(list);
}
use of com.linkedin.thirdeye.datalayer.util.Predicate in project pinot by linkedin.
the class AutotuneConfigManagerImpl method findAllByFunctionIdAndAutotuneMethod.
@Override
public List<AutotuneConfigDTO> findAllByFunctionIdAndAutotuneMethod(long functionId, String autoTuneMethod) {
Predicate predicate = Predicate.AND(Predicate.EQ(FUNCTION_ID, functionId), Predicate.EQ(AUTOTUNE_METHOD, autoTuneMethod));
List<AutotuneConfigBean> list = genericPojoDao.get(predicate, AutotuneConfigBean.class);
return beansToDTOs(list);
}
use of com.linkedin.thirdeye.datalayer.util.Predicate in project pinot by linkedin.
the class AutotuneConfigManagerImpl method findAllByFuctionIdAndWindow.
@Override
public List<AutotuneConfigDTO> findAllByFuctionIdAndWindow(long functionId, long startTime, long endTime) {
Predicate predicate = Predicate.AND(Predicate.EQ(FUNCTION_ID, functionId), Predicate.GE(START_TIME, startTime), Predicate.LE(END_TIME, endTime));
List<AutotuneConfigBean> list = genericPojoDao.get(predicate, AutotuneConfigBean.class);
return beansToDTOs(list);
}
use of com.linkedin.thirdeye.datalayer.util.Predicate 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;
}
Aggregations