@Override public final Set<IPersonAttributes> getPeopleWithMultivaluedAttributes( Map<String, List<Object>> query) { Validate.notNull(query, "query may not be null."); // Generate the query to pass to the subclass final LocalAccountQuery queryBuilder = this.generateQuery(query); if (queryBuilder == null) { this.logger.debug( "No queryBuilder was generated for query " + query + ", null will be returned"); return null; } // Get the username from the query, if specified final IUsernameAttributeProvider usernameAttributeProvider = this.getUsernameAttributeProvider(); // Execute the query in the subclass final List<ILocalAccountPerson> unmappedPeople = localAccountDao.getPeople(queryBuilder); if (unmappedPeople == null) { return null; } // Map the attributes of the found people according to resultAttributeMapping if it is set final Set<IPersonAttributes> mappedPeople = new LinkedHashSet<IPersonAttributes>(); for (final ILocalAccountPerson unmappedPerson : unmappedPeople) { final IPersonAttributes mappedPerson = this.mapPersonAttributes(unmappedPerson); mappedPeople.add(mappedPerson); } return Collections.unmodifiableSet(mappedPeople); }
@Override public final Set<IPersonAttributes> getPeopleWithMultivaluedAttributes( Map<String, List<Object>> query) { Validate.notNull(query, "query may not be null."); // Generate the query to pass to the subclass final LocalAccountQuery queryBuilder = this.generateQuery(query); if (queryBuilder == null) { this.logger.debug( "No queryBuilder was generated for query " + query + ", null will be returned"); return null; } // Get the username from the query, if specified final IUsernameAttributeProvider usernameAttributeProvider = this.getUsernameAttributeProvider(); // Execute the query in the subclass final List<ILocalAccountPerson> unmappedPeople = localAccountDao.getPeople(queryBuilder); if (unmappedPeople == null) { return null; } // Map the attributes of the found people according to resultAttributeMapping if it is set final Set<IPersonAttributes> mappedPeople = new LinkedHashSet<IPersonAttributes>(); for (final ILocalAccountPerson unmappedPerson : unmappedPeople) { final IPersonAttributes mappedPerson = this.mapPersonAttributes(unmappedPerson); mappedPeople.add(mappedPerson); } return Collections.unmodifiableSet(mappedPeople); }