use of org.openkilda.persistence.hibernate.entities.history.HibernateFlowEventAction in project open-kilda by telstra.
the class HibernateHistoryFlowEventRepository method makeEntity.
@Override
protected HibernateFlowEvent makeEntity(FlowEventData view) {
HibernateFlowEvent entity = new HibernateFlowEvent();
FlowEventCloner.INSTANCE.copyWithoutRecordsAndDumps(view, entity);
for (FlowEventAction entry : view.getEventActions()) {
HibernateFlowEventAction action = new HibernateFlowEventAction();
FlowEventActionCloner.INSTANCE.copy(entry.getData(), action);
entity.addAction(action);
}
for (FlowEventDump entry : view.getEventDumps()) {
HibernateFlowEventDump dump = new HibernateFlowEventDump();
FlowEventDumpCloner.INSTANCE.copy(entry.getData(), dump);
entity.addDump(dump);
}
return entity;
}
use of org.openkilda.persistence.hibernate.entities.history.HibernateFlowEventAction in project open-kilda by telstra.
the class HibernateHistoryFlowEventActionRepository method makeEntity.
@Override
protected HibernateFlowEventAction makeEntity(FlowEventActionData view) {
HibernateFlowEventAction entity = new HibernateFlowEventAction();
FlowEventActionCloner.INSTANCE.copy(view, entity);
entity.setEvent(flowEventRepository.findEntityByTaskId(view.getTaskId()).orElse(null));
return entity;
}
Aggregations