Interface PersonAttributeDao
- All Superinterfaces:
Comparable<PersonAttributeDao>,org.springframework.core.Ordered
public interface PersonAttributeDao
extends Comparable<PersonAttributeDao>, org.springframework.core.Ordered
Defines methods for finding a
PersonAttributes or Set of IPersons based on a user ID or a Map of user attributes to
query with.- Since:
- 7.1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringWildcard indicator.static final PatternWildcard regex pattern.Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Method Summary
Modifier and TypeMethodDescriptionGets aSetof attribute names that this implementation knows how to use in a query.default String[]getId()Gets the unique identifier for this dao.default intgetOrder()Describes the order by which this DAO may be sorted and put into an ordered collection.default Set<PersonAttributes> Gets people.default Set<PersonAttributes> Gets people.default Set<PersonAttributes> getPeople(Map<String, Object> query, PersonAttributeDaoFilter filter) Gets people.getPeople(Map<String, Object> query, PersonAttributeDaoFilter filter, Set<PersonAttributes> resultPeople) Searches forPersonAttributess that match the set of attributes provided in the queryMap.default Set<PersonAttributes> Gets people with multivalued attributes.default Set<PersonAttributes> getPeopleWithMultivaluedAttributes(Map<String, List<Object>> query, Set<PersonAttributes> resultPeople) Gets people with multivalued attributes.default Set<PersonAttributes> getPeopleWithMultivaluedAttributes(Map<String, List<Object>> query, PersonAttributeDaoFilter filter) Gets people with multivalued attributes.default Set<PersonAttributes> getPeopleWithMultivaluedAttributes(Map<String, List<Object>> query, PersonAttributeDaoFilter filter, Set<PersonAttributes> resultPeople) Searches forPersonAttributess that match the set of attributes provided in the queryMap.default PersonAttributesGets person.default PersonAttributesgetPerson(String uid, Set<PersonAttributes> resultPeople) Gets person.getPerson(String uid, Set<PersonAttributes> resultPeople, PersonAttributeDaoFilter filter) Searches for a singlePersonAttributesusing the specified uid (userName).Gets aSetof attribute names that may be returned for an IPersonAttributes.getTags()Gets properties assigned to this repository.default booleanIs this dao enabled?stuffAttributesIntoList(Map<String, ?> personAttributesMap, PersonAttributeDaoFilter filter) Stuff attributes into list.Methods inherited from interface java.lang.Comparable
compareTo
-
Field Details
-
WILDCARD
Wildcard indicator.- See Also:
-
WILDCARD_PATTERN
Wildcard regex pattern.
-
-
Method Details
-
getPerson
PersonAttributes getPerson(String uid, Set<PersonAttributes> resultPeople, PersonAttributeDaoFilter filter) Searches for a singlePersonAttributesusing the specified uid (userName).
This method returns according to the following rules:
- If the user exists and has attributes a populated
PersonAttributesis returned. - If the user exists and has no attributes an
PersonAttributeswith an empty attributes Map is returned. - If the user doesn't exist
nullis returned. - If an error occurs while find the person an appropriate exception will be thrown.
- Parameters:
uid- The userName of the person to find.resultPeople- the result peoplefilter- the filter- Returns:
- The populated
PersonAttributesfor the specified uid, null if no person could be found for the uid. - Throws:
IllegalArgumentException- Ifuidisnull.
- If the user exists and has attributes a populated
-
getPerson
Gets person.- Parameters:
uid- the uid- Returns:
- the person
-
getPerson
Gets person.- Parameters:
uid- the uidresultPeople- the result people- Returns:
- the person
-
getPeople
Set<PersonAttributes> getPeople(Map<String, Object> query, PersonAttributeDaoFilter filter, Set<PersonAttributes> resultPeople) Searches forPersonAttributess that match the set of attributes provided in the queryMap. Each implementation is free to define what qualifies as a 'match' is on its own. The provided query Map contains String attribute names and single values which may be null.
If the implementation can not execute its query for an expected reason such as not enough information in the queryMapnull should be returned. For unexpected problems throw an exception.- Parameters:
query- AMapof name/value pair attributes to use in searching forPersonAttributessfilter- the filterresultPeople- the result people- Returns:
- A
SetofPersonAttributess that match the queryMap. If no matches are found an emptySetis returned. If the query could not be run null is returned. - Throws:
IllegalArgumentException- Ifqueryisnull.
-
getPeople
Gets people.- Parameters:
query- the query- Returns:
- the people
-
getPeople
Gets people.- Parameters:
query- the queryfilter- the filter- Returns:
- the people
-
getPeople
default Set<PersonAttributes> getPeople(Map<String, Object> query, Set<PersonAttributes> resultPeople) Gets people.- Parameters:
query- the queryresultPeople- the result people- Returns:
- the people
-
getPeopleWithMultivaluedAttributes
default Set<PersonAttributes> getPeopleWithMultivaluedAttributes(Map<String, List<Object>> query, PersonAttributeDaoFilter filter, Set<PersonAttributes> resultPeople) Searches forPersonAttributess that match the set of attributes provided in the queryMap. Each implementation is free to define what qualifies as a 'match' is on its own. The provided query Map contains String attribute names and single values which may be null.
If the implementation can not execute its query for an expected reason such as not enough information in the queryMapnull should be returned. For unexpected problems throw an exception.- Parameters:
query- AMapof name/value pair attributes to use in searching forPersonAttributessfilter- the filterresultPeople- the result people from previous attempts, if any.- Returns:
- A
SetofPersonAttributess that match the queryMap. If no matches are found an emptySetis returned. If the query could not be run null is returned. - Throws:
IllegalArgumentException- Ifqueryisnull.
-
getPeopleWithMultivaluedAttributes
default Set<PersonAttributes> getPeopleWithMultivaluedAttributes(Map<String, List<Object>> query, PersonAttributeDaoFilter filter) Gets people with multivalued attributes.- Parameters:
query- the queryfilter- the filter- Returns:
- the people with multivalued attributes
-
getPeopleWithMultivaluedAttributes
Gets people with multivalued attributes.- Parameters:
query- the query- Returns:
- the people with multivalued attributes
-
getPeopleWithMultivaluedAttributes
default Set<PersonAttributes> getPeopleWithMultivaluedAttributes(Map<String, List<Object>> query, Set<PersonAttributes> resultPeople) Gets people with multivalued attributes.- Parameters:
query- the queryresultPeople- the result people- Returns:
- the people with multivalued attributes
-
getPossibleUserAttributeNames
Gets aSetof attribute names that may be returned for an IPersonAttributes. The names returned represent all possible attributes names for thePersonAttributesobjects returned by the get methods. If the dao doesn't have a way to know all possible attribute names this method should returnnull.
Returns an immutableSet.- Parameters:
filter- the filter- Returns:
- A
Setof possible attribute names for user queries.
-
getAvailableQueryAttributes
Gets aSetof attribute names that this implementation knows how to use in a query. The names returned represent all possible names for query attributes for this implmenentation. If the dao doesn't have a way to know all possible query attribute names this method should returnnull
Returns an immutableSet.- Parameters:
filter- the filter- Returns:
- The set of attributes that can be used to query for user ids in this dao, null if the set is unknown.
-
getOrder
default int getOrder()Describes the order by which this DAO may be sorted and put into an ordered collection.- Specified by:
getOrderin interfaceorg.springframework.core.Ordered- Returns:
- the numeric order.
-
getId
Gets the unique identifier for this dao.- Returns:
- the id
-
isEnabled
default boolean isEnabled()Is this dao enabled?- Returns:
- true/false
-
getTags
Gets properties assigned to this repository. Properties are arbitrary tags and labels assigned to a repository for follow-up processing.- Returns:
- the properties
-
stuffAttributesIntoList
default Map<String,List<Object>> stuffAttributesIntoList(Map<String, ?> personAttributesMap, PersonAttributeDaoFilter filter) Stuff attributes into list.- Parameters:
personAttributesMap- the person attributes mapfilter- the filter- Returns:
- the map
-