Search in sources :

Example 1 with EventBean

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

the class EventManagerImpl method findEventsBetweenTimeRange.

public List<EventDTO> findEventsBetweenTimeRange(String eventType, long start, long end) {
    Predicate predicate = Predicate.AND(Predicate.EQ("eventType", eventType), Predicate.GT("endTime", start), Predicate.LT("startTime", end));
    List<EventBean> list = genericPojoDao.get(predicate, EventBean.class);
    List<EventDTO> results = new ArrayList<>();
    for (EventBean event : list) {
        EventDTO eventDTO = MODEL_MAPPER.map(event, EventDTO.class);
        results.add(eventDTO);
    }
    return results;
}
Also used : EventBean(com.linkedin.thirdeye.datalayer.pojo.EventBean) ArrayList(java.util.ArrayList) EventDTO(com.linkedin.thirdeye.datalayer.dto.EventDTO) Predicate(com.linkedin.thirdeye.datalayer.util.Predicate)

Example 2 with EventBean

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

the class EventManagerImpl method findEventsBetweenTimeRangeByName.

public List<EventDTO> findEventsBetweenTimeRangeByName(String eventType, String name, long start, long end) {
    Predicate predicate = Predicate.AND(Predicate.EQ("eventType", eventType), Predicate.EQ("name", name), Predicate.GT("endTime", start), Predicate.LT("startTime", end));
    List<EventBean> list = genericPojoDao.get(predicate, EventBean.class);
    List<EventDTO> results = new ArrayList<>();
    for (EventBean event : list) {
        EventDTO eventDTO = MODEL_MAPPER.map(event, EventDTO.class);
        results.add(eventDTO);
    }
    return results;
}
Also used : EventBean(com.linkedin.thirdeye.datalayer.pojo.EventBean) ArrayList(java.util.ArrayList) EventDTO(com.linkedin.thirdeye.datalayer.dto.EventDTO) Predicate(com.linkedin.thirdeye.datalayer.util.Predicate)

Example 3 with EventBean

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

the class EventManagerImpl method findByEventType.

public List<EventDTO> findByEventType(String eventType) {
    Predicate predicate = Predicate.EQ("eventType", eventType);
    List<EventBean> list = genericPojoDao.get(predicate, EventBean.class);
    List<EventDTO> results = new ArrayList<>();
    for (EventBean event : list) {
        EventDTO eventDTO = MODEL_MAPPER.map(event, EventDTO.class);
        results.add(eventDTO);
    }
    return results;
}
Also used : EventBean(com.linkedin.thirdeye.datalayer.pojo.EventBean) ArrayList(java.util.ArrayList) EventDTO(com.linkedin.thirdeye.datalayer.dto.EventDTO) Predicate(com.linkedin.thirdeye.datalayer.util.Predicate)

Aggregations

EventDTO (com.linkedin.thirdeye.datalayer.dto.EventDTO)3 EventBean (com.linkedin.thirdeye.datalayer.pojo.EventBean)3 Predicate (com.linkedin.thirdeye.datalayer.util.Predicate)3 ArrayList (java.util.ArrayList)3