org.jasig.services.persondir.support.jdbc
Class AbstractJdbcPersonAttributeDao
java.lang.Object
org.jasig.services.persondir.support.AbstractFlatteningPersonAttributeDao
org.jasig.services.persondir.support.AbstractDefaultAttributePersonAttributeDao
org.jasig.services.persondir.support.AbstractQueryPersonAttributeDao
org.jasig.services.persondir.support.jdbc.AbstractJdbcPersonAttributeDao
- All Implemented Interfaces:
- org.jasig.services.persondir.IPersonAttributeDao
- Direct Known Subclasses:
- MultiRowJdbcPersonAttributeDao, SingleRowJdbcPersonAttributeDao
public abstract class AbstractJdbcPersonAttributeDao
- extends AbstractQueryPersonAttributeDao
Provides common logic for executing a JDBC based attribute query.
- Version:
- $Revision: 43106 $
- 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 |
AbstractJdbcPersonAttributeDao
public AbstractJdbcPersonAttributeDao(DataSource ds,
String sql)
- Parameters:
ds - The DataSource to use for queriessql - The SQL to execute
getSql
protected String getSql()
- Returns:
- the sql that is used for the query
parseAttributeMapFromResults
protected abstract Map<String,List<Object>> parseAttributeMapFromResults(List<Map<String,Object>> queryResults)
- Takes the
List of Maps from the query and parses it into the attribute Map to be returned.
- Parameters:
queryResults - Results from the query.
- Returns:
- The results of the query, as specified by
IPersonAttributeDao.getMultivaluedUserAttributes(Map)
getUserAttributesIfNeeded
protected final Map<String,List<Object>> getUserAttributesIfNeeded(Object[] args)
- Runs the sql specified in the constructor.
Calls parseAttributeMapFromResults(List) with the query results.
Returns results from parseAttributeMapFromResults(List) link.
- Overrides:
getUserAttributesIfNeeded in class AbstractQueryPersonAttributeDao
- Parameters:
args - The arguments to execute the query with.
- Returns:
- The results of the query, as specified by
IPersonAttributeDao.getUserAttributes(Map)
Copyright © 1998-2008 Java Architectures Special Interest Group. All Rights Reserved.