use of org.talend.esb.sam.common.event.Event in project tesb-rt-se by Talend.
the class EventRepositoryImpl method readEvent.
/* (non-Javadoc)
* @see org.talend.esb.sam.common.event.persistence.EventRepository#readEvent(long)
*/
@Override
public Event readEvent(long id) {
RowMapper<Event> rowMapper = new EventRowMapper();
Event event = getJdbcTemplate().queryForObject("select * from EVENTS where ID=" + id, rowMapper);
event.getCustomInfo().clear();
event.getCustomInfo().putAll(readCustomInfo(id));
return event;
}
use of org.talend.esb.sam.common.event.Event in project tesb-rt-se by Talend.
the class EventMapperTest method testEventMapper.
@Test
public void testEventMapper() throws IOException {
Event event = new Event();
event.setContent("testContent");
EventType eventOut = EventMapper.map(event);
DataHandler dh = eventOut.getContent();
String outContent = getContent(dh);
Assert.assertEquals(event.getContent(), outContent);
// TODO test the other properties
}
Aggregations