org.jasig.services.persondir.support.jdbc
Class AbstractJdbcPersonAttributeDao

java.lang.Object
  extended by org.jasig.services.persondir.support.AbstractDefaultAttributePersonAttributeDao
      extended by org.jasig.services.persondir.support.AbstractQueryPersonAttributeDao
          extended by org.jasig.services.persondir.support.jdbc.AbstractJdbcPersonAttributeDao
All Implemented Interfaces:
IPersonAttributeDao
Direct Known Subclasses:
MultiRowJdbcPersonAttributeDao, SingleRowJdbcPersonAttributeDao

public abstract class AbstractJdbcPersonAttributeDao
extends AbstractQueryPersonAttributeDao

Provides common logic for executing a JDBC based attribute query.

Configuration:

Property Description Required Default
queryAttributes This class overrides the AbstractQueryPersonAttributeDao.setQueryAttributes(List) requiring a non-null List and enforcing that it can only be set once. Yes null

Version:
$Revision: 2892 $
Author:
Eric Dalquist eric.dalquist@doit.wisc.edu

Field Summary
 
Fields inherited from class org.jasig.services.persondir.support.AbstractDefaultAttributePersonAttributeDao
logger
 
Constructor Summary
AbstractJdbcPersonAttributeDao()
           
 
Method Summary
protected abstract  AbstractPersonAttributeMappingQuery getAttributeQuery()
           
protected  Map getUserAttributesIfNeeded(Object[] args)
          Gets the query from the getAttributeQuery() method.
Runs the query.
Calls parseAttributeMapFromResults(List) with the query results.
Returns results from parseAttributeMapFromResults(List) link.
protected abstract  Map parseAttributeMapFromResults(List queryResults)
          Takes the List from the AbstractPersonAttributeMappingQuery implementation and passes it to the implementing the class for parsing into the returned user attribute Map.
 void setQueryAttributes(List queryAttributes)
          JDBC DAOs require a non-null queryAttribute list.
 
Methods inherited from class org.jasig.services.persondir.support.AbstractQueryPersonAttributeDao
getQueryAttributes, getUserAttributes
 
Methods inherited from class org.jasig.services.persondir.support.AbstractDefaultAttributePersonAttributeDao
getDefaultAttributeName, getUserAttributes, setDefaultAttributeName
 
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
 

Constructor Detail

AbstractJdbcPersonAttributeDao

public AbstractJdbcPersonAttributeDao()
Method Detail

parseAttributeMapFromResults

protected abstract Map parseAttributeMapFromResults(List queryResults)
Takes the List from the AbstractPersonAttributeMappingQuery implementation and passes it to the implementing the class for parsing into the returned user attribute Map.

Parameters:
queryResults - Results from the query done using the AbstractPersonAttributeMappingQuery returned by getAttributeQuery()
Returns:
The results of the query, as specified by org.jasig.portal.services.persondir.IPersonAttributeDao#getUserAttributes(Map)

getAttributeQuery

protected abstract AbstractPersonAttributeMappingQuery getAttributeQuery()
Returns:
The subclasses implementation of the AbstractPersonAttributeMappingQuery.

getUserAttributesIfNeeded

protected final Map getUserAttributesIfNeeded(Object[] args)
Gets the query from the getAttributeQuery() method.
Runs the query.
Calls parseAttributeMapFromResults(List) with the query results.
Returns results from parseAttributeMapFromResults(List) link.

Specified by:
getUserAttributesIfNeeded in class AbstractQueryPersonAttributeDao
Parameters:
args - The arguments to execute the query with.
Returns:
The results of the query, as specified by org.jasig.portal.services.persondir.IPersonAttributeDao#getUserAttributes(Map)
See Also:
org.jasig.portal.services.persondir.support.AbstractQueryPersonAttributeDao#getUserAttributesIfNeeded(java.lang.Object[])

setQueryAttributes

public void setQueryAttributes(List queryAttributes)
JDBC DAOs require a non-null queryAttribute list. This setter also only allows the queryAttributes List to be set once.

Overrides:
setQueryAttributes in class AbstractQueryPersonAttributeDao
Parameters:
queryAttributes - The queryAttributes to set.
See Also:
AbstractQueryPersonAttributeDao.setQueryAttributes(java.util.List)


Copyright © 1998-2007 Java Architectures Special Interest Group. All Rights Reserved.