org.jasig.services.persondir.support
Class AbstractQueryPersonAttributeDao
java.lang.Object
org.jasig.services.persondir.support.AbstractFlatteningPersonAttributeDao
org.jasig.services.persondir.support.AbstractDefaultAttributePersonAttributeDao
org.jasig.services.persondir.support.AbstractQueryPersonAttributeDao
- All Implemented Interfaces:
- org.jasig.services.persondir.IPersonAttributeDao
- Direct Known Subclasses:
- AbstractJdbcPersonAttributeDao, LdapPersonAttributeDao
public abstract class AbstractQueryPersonAttributeDao
- extends AbstractDefaultAttributePersonAttributeDao
Provides common functionality for DAOs using a set of attribute values from the seed to
perform a query. Ensures the nessesary attributes to run the query exist on the seed and
organizes the values into an argument array.
Configuration:
- Version:
- $Revision: 43243 $
- Author:
- Eric Dalquist
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jasig.services.persondir.IPersonAttributeDao |
getPossibleUserAttributeNames |
AbstractQueryPersonAttributeDao
public AbstractQueryPersonAttributeDao()
getMultivaluedUserAttributes
public final Map<String,List<Object>> getMultivaluedUserAttributes(Map<String,List<Object>> seed)
- Checks the seed for being null, throws IllegalArgumentException if it is.
Ensures the seed contains the attributes needed to run the query, returns null if they aren't available.
Compiles the Object[] of arguments from the seed based on the queryAttributes.
- See Also:
IPersonAttributeDao.getMultivaluedUserAttributes(java.util.Map)
getUserAttributesIfNeeded
protected Map<String,List<Object>> getUserAttributesIfNeeded(List<List<Object>> args)
- Collates the first argument in each sub-list into an Object[] to pass to
getUserAttributesIfNeeded(Object[])
- See Also:
getUserAttributesIfNeeded(Object[])
getUserAttributesIfNeeded
protected Map<String,List<Object>> getUserAttributesIfNeeded(Object[] args)
- Is called by
AbstractFlatteningPersonAttributeDao.getUserAttributes(Map) if the attributes required for the query, as defined
by the values of the queryAttributes property, are available in the seed. The implementation of
AbstractFlatteningPersonAttributeDao.getUserAttributes(Map) also compiles the array of query argument values based on the order
of items in the queryAttributes property and the values in the seed.
- Parameters:
args - The arguments to execute the query with.
- Returns:
- The results of the query, as specified by
IPersonAttributeDao.getUserAttributes(Map)
getQueryArgumentArray
protected Object[] getQueryArgumentArray(List<List<Object>> args)
- Converts the List of List of value type to an Object[]. This implementation uses the first value of each
sub-list as the value for the returned object array.
- Parameters:
args - the List of List of values to generate an object array from.
- Returns:
- An array of arguments based on the lists
getQueryAttributes
public final List<String> getQueryAttributes()
- Returns:
- Returns the queryAttributes.
setQueryAttributes
public final void setQueryAttributes(List<String> queryAttributes)
- Parameters:
queryAttributes - The queryAttributes to set.
Copyright © 1998-2008 Java Architectures Special Interest Group. All Rights Reserved.