public class MultiRowJdbcPersonAttributeDao extends AbstractJdbcPersonAttributeDao<java.util.Map<java.lang.String,java.lang.Object>>
IPersonAttributeDao
implementation that maps attribute names and values from name and value column
pairs. This is usefull if user attributes are stored in a table like:| USER_NM | ATTR_NM | ATTR_VL |
|---|---|---|
| jstudent | name.given | joe |
| jstudent | name.family | student |
| badvisor | name.given | bob |
| badvisor | name.family | advisor |
SingleRowJdbcPersonAttributeDao which expects
a single row result for a user query. | Property | Description | Required | Default |
|---|---|---|---|
| nameValueColumnMappings |
A Map of attribute name columns to attribute value columns. A single result row can have multiple
name columns and multiple value columns associated with each name. The values of the Map can be
either String or Collection of String.
|
Yes | null |
DEFAULT_CASE_CANONICALIZATION_MODE, DEFAULT_USERNAME_CASE_CANONICALIZATION_MODEloggerWILDCARD, WILDCARD_PATTERN| Constructor and Description |
|---|
MultiRowJdbcPersonAttributeDao() |
MultiRowJdbcPersonAttributeDao(javax.sql.DataSource ds,
java.lang.String sql)
Creates a new MultiRowJdbcPersonAttributeDao specifying the DataSource and SQL to use.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> |
getNameValueColumnMappings() |
protected org.springframework.jdbc.core.RowMapper<java.util.Map<java.lang.String,java.lang.Object>> |
getRowMapper() |
protected java.util.List<IPersonAttributes> |
parseAttributeMapFromResults(java.util.List<java.util.Map<java.lang.String,java.lang.Object>> queryResults,
java.lang.String queryUserName)
Takes the
List from the query and parses it into the List of IPersonAttributes attributes to be returned. |
void |
setNameValueColumnMappings(java.util.Map<java.lang.String,?> nameValueColumnMap)
The
Map of columns from a name column to value columns. |
appendAttributeToQuery, canonicalizeDataAttributeForSql, getCaseInsensitiveDataAttributes, getDataAttributeCaseCanonicalizationFunctions, getPeopleForQuery, getQueryTemplate, getQueryType, setCaseInsensitiveDataAttributes, setCaseInsensitiveDataAttributesAsCollection, setDataAttributeCaseCanonicalizationFunctions, setQueryTypeappendCanonicalizedAttributeToQuery, canonicalizeAttribute, generateQuery, getAvailableQueryAttributes, getCaseCanonicalizationLocale, getCaseInsensitiveQueryAttributes, getCaseInsensitiveResultAttributes, getConfiguredUserNameAttribute, getDefaultCaseCanonicalizationMode, getPeopleWithMultivaluedAttributes, getPossibleUserAttributeNames, getQueryAttributeMapping, getResultAttributeMapping, getUnmappedUsernameAttribute, getUsernameCaseCanonicalizationMode, isRequireAllQueryAttributes, isUseAllQueryAttributes, isUserNameAttributeConfigured, mapPersonAttributes, setCaseCanonicalizationLocale, setCaseInsensitiveQueryAttributes, setCaseInsensitiveQueryAttributesAsCollection, setCaseInsensitiveResultAttributes, setCaseInsensitiveResultAttributesAsCollection, setDefaultCaseCanonicalizationMode, setQueryAttributeMapping, setRequireAllQueryAttributes, setResultAttributeMapping, setUnmappedUsernameAttribute, setUseAllQueryAttributes, setUsernameCaseCanonicalizationModegetPerson, getUsernameAttributeProvider, setUsernameAttributeProvider, toSeedMapgetPeople, toMultivaluedSeedcompareTo, flattenResults, getMultivaluedUserAttributes, getMultivaluedUserAttributes, getOrder, getUserAttributes, getUserAttributes, setOrderpublic MultiRowJdbcPersonAttributeDao()
public MultiRowJdbcPersonAttributeDao(javax.sql.DataSource ds,
java.lang.String sql)
ds - The DataSource to get connections from for executing queries, may not be null.sql - The SQL to execute for user attributes, may not be null.public java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getNameValueColumnMappings()
public void setNameValueColumnMappings(java.util.Map<java.lang.String,?> nameValueColumnMap)
Map of columns from a name column to value columns. Keys are Strings,
Values are Strings or List of Strings.nameValueColumnMap - The Map of name column to value column(s).protected org.springframework.jdbc.core.RowMapper<java.util.Map<java.lang.String,java.lang.Object>> getRowMapper()
getRowMapper in class AbstractJdbcPersonAttributeDao<java.util.Map<java.lang.String,java.lang.Object>>protected java.util.List<IPersonAttributes> parseAttributeMapFromResults(java.util.List<java.util.Map<java.lang.String,java.lang.Object>> queryResults, java.lang.String queryUserName)
AbstractJdbcPersonAttributeDaoList from the query and parses it into the List of IPersonAttributes attributes to be returned.parseAttributeMapFromResults in class AbstractJdbcPersonAttributeDao<java.util.Map<java.lang.String,java.lang.Object>>queryResults - Results from the query.queryUserName - The username passed in the query map, if no username attribute existed in the query Map null is provided.Copyright © 2005-2018. All Rights Reserved.