public class CascadingPersonAttributeDao extends AbstractAggregatingDefaultQueryPersonAttributeDao
IPersonAttributeDao
implementation iterates through an ordered List of
IPersonAttributeDao impls
when getting user attributes.
Map passed to this class. The results
of the query are merged into a general result map. After the first DAO this general
result map used as the query seed for each DAO and each DAO's results are merged into it.
stopIfFirstDaoReturnsNull=true, no subsequent DAO is
called and null is the final result.stopIfFirstDaoReturnsNull=false, each subsequent DAO is
called and the first that returns a result is used as the seed to the remaining child DAOs. This is the default
to support legacy behavior.ReplacingAttributeAdder.
EchoPersonAttributeDaoImpl
to ensure the seed gets placed into the general result map.attrMerger, personAttributeDaos, recoverExceptions, stopOnSuccessloggerWILDCARD, WILDCARD_PATTERN| Constructor and Description |
|---|
CascadingPersonAttributeDao() |
| Modifier and Type | Method and Description |
|---|---|
protected Set<IPersonAttributes> |
getAttributesFromDao(Map<String,List<Object>> seed,
boolean isFirstQuery,
IPersonAttributeDao currentlyConsidering,
Set<IPersonAttributes> resultPeople)
If this is the first call, or there are no results in the resultPeople Set and stopIfFirstDaoReturnsNull=false,
the seed map is used.
|
void |
setStopIfFirstDaoReturnsNull(boolean stopIfFirstDaoReturnsNull) |
getAvailableQueryAttributes, getMerger, getPeopleWithMultivaluedAttributes, getPersonAttributeDaos, getPossibleUserAttributeNames, isRecoverExceptions, isStopOnSuccess, setMerger, setPersonAttributeDaos, setRecoverExceptions, setStopOnSuccessgetPerson, getUsernameAttributeProvider, setUsernameAttributeProvider, toSeedMapgetPeople, toMultivaluedSeedflattenResults, getMultivaluedUserAttributes, getMultivaluedUserAttributes, getUserAttributes, getUserAttributespublic void setStopIfFirstDaoReturnsNull(boolean stopIfFirstDaoReturnsNull)
protected Set<IPersonAttributes> getAttributesFromDao(Map<String,List<Object>> seed, boolean isFirstQuery, IPersonAttributeDao currentlyConsidering, Set<IPersonAttributes> resultPeople)
getAttributesFromDao in class AbstractAggregatingDefaultQueryPersonAttributeDaoseed - The seed for the original query.isFirstQuery - If this is the first query, this will stay true until a call to this method returns (does not throw an exception).currentlyConsidering - The IPersonAttributeDao to execute the query on.resultPeople - The Map of results from all previous queries, may be null.IPersonAttributeDao.getUserAttributes(Map).AbstractAggregatingDefaultQueryPersonAttributeDao.getAttributesFromDao(java.util.Map, boolean, org.jasig.services.persondir.IPersonAttributeDao, java.util.Set)Copyright © 2015 Jasig. All Rights Reserved.