Search in sources :

Example 6 with AnomalyFunctionBean

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

the class EmailConfigurationManagerImpl method convertEmailConfigurationBean2DTO.

private EmailConfigurationDTO convertEmailConfigurationBean2DTO(EmailConfigurationBean emailConfigurationBean) {
    EmailConfigurationDTO emailConfigurationDTO = convertBean2DTO(emailConfigurationBean, EmailConfigurationDTO.class);
    List<Long> functionIds = emailConfigurationBean.getFunctionIds();
    if (functionIds != null && !functionIds.isEmpty()) {
        List<AnomalyFunctionBean> list = genericPojoDao.get(functionIds, AnomalyFunctionBean.class);
        List<AnomalyFunctionDTO> functions = new ArrayList<>();
        for (AnomalyFunctionBean bean : list) {
            AnomalyFunctionDTO dto = convertBean2DTO(bean, AnomalyFunctionDTO.class);
            functions.add(dto);
        }
        emailConfigurationDTO.setFunctions(functions);
    }
    return emailConfigurationDTO;
}
Also used : AnomalyFunctionBean(com.linkedin.thirdeye.datalayer.pojo.AnomalyFunctionBean) ArrayList(java.util.ArrayList) EmailConfigurationDTO(com.linkedin.thirdeye.datalayer.dto.EmailConfigurationDTO) AnomalyFunctionDTO(com.linkedin.thirdeye.datalayer.dto.AnomalyFunctionDTO)

Aggregations

AnomalyFunctionDTO (com.linkedin.thirdeye.datalayer.dto.AnomalyFunctionDTO)6 AnomalyFunctionBean (com.linkedin.thirdeye.datalayer.pojo.AnomalyFunctionBean)6 ArrayList (java.util.ArrayList)5 Predicate (com.linkedin.thirdeye.datalayer.util.Predicate)3 AnomalyFeedbackDTO (com.linkedin.thirdeye.datalayer.dto.AnomalyFeedbackDTO)2 RawAnomalyResultDTO (com.linkedin.thirdeye.datalayer.dto.RawAnomalyResultDTO)2 AnomalyFeedbackBean (com.linkedin.thirdeye.datalayer.pojo.AnomalyFeedbackBean)2 EmailConfigurationDTO (com.linkedin.thirdeye.datalayer.dto.EmailConfigurationDTO)1 MergedAnomalyResultDTO (com.linkedin.thirdeye.datalayer.dto.MergedAnomalyResultDTO)1 RawAnomalyResultBean (com.linkedin.thirdeye.datalayer.pojo.RawAnomalyResultBean)1 HashSet (java.util.HashSet)1