class TrainServiceImpl implements TrainService {

    @Override
    public TrainType retrieve(String id, HttpHeaders headers) {
        if (repository.findById(id) == null) {
            return null;
        } else {
            return repository.findById(id);
        }
    }

}