class DatabaseFDFlowManager extends BaseService implements FDFlowManager {

    @Override
    public Optional<FDFlowEvent> getFlowEvent(final String flowEventId) {
        if (StringUtils.isBlank(flowEventId)) {
            throw new IllegalArgumentException("Flow event id cannot be null or blank");
        }

        final Optional<FDFlowEventEntity> flowEventEntity = flowEventRepository.findById(flowEventId);
        if (flowEventEntity.isPresent()) {
            final FDFlowEvent flowEvent = modelMapper.map(flowEventEntity.get(), FDFlowEvent.class);
            return Optional.of(flowEvent);
        } else {
            return Optional.empty();
        }
    }

    @Autowired public  DatabaseFDFlowManager(final FDFlowRepository flowRepository,
                                 final FDFlowEventRepository flowEventRepository,
                                 final OptionalModelMapper modelMapper,
                                 final ObjectMapper objectMapper,
                                 final Validator validator);

}