class OrganisationUnitSupplier extends AbstractSupplier<Map<String, OrganisationUnit>> {

    @Override
    public Map<String, OrganisationUnit> get( ImportOptions importOptions, List<Event> events )
    {
        //
        // Get the IdScheme for Org Units. Org Units should support also the Attribute
        // Scheme, based on JSONB
        //
        IdScheme idScheme = importOptions.getIdSchemes().getOrgUnitIdScheme();

        if ( events == null )
        {
            return new HashMap<>();
        }

        //
        // Collect all the org unit IDs (based on the IdScheme) to pass as SQL query
        // argument
        //
        // @formatter:off
        final Set<String> orgUnitUids = events.stream()
            .filter( e -> e.getOrgUnit() != null ).map( Event::getOrgUnit )
            .collect( Collectors.toSet() );
        // @formatter:on

        if ( isEmpty( orgUnitUids ) )
        {
            return new HashMap<>();
        }

        // Create a map: org unit uid -> List [event uid]
        Multimap<String, String> orgUnitToEvent = HashMultimap.create();
        for ( Event event : events )
        {
            orgUnitToEvent.put( event.getOrgUnit(), event.getUid() );
        }

        return fetchOu( idScheme, orgUnitUids, orgUnitToEvent );

    }

    public  OrganisationUnitSupplier( NamedParameterJdbcTemplate jdbcTemplate );

}