org.apereo.cas.jdbc.MultiRowJdbcPersonAttributeDao Maven / Gradle / Ivy
package org.apereo.cas.jdbc;
import org.apereo.cas.authentication.attribute.SimplePersonAttributes;
import org.apereo.cas.authentication.principal.attribute.PersonAttributeDao;
import org.apereo.cas.authentication.principal.attribute.PersonAttributes;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import lombok.val;
import org.springframework.jdbc.core.RowMapper;
import javax.sql.DataSource;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* An {@link PersonAttributeDao}
* implementation that maps attribute names and values from name and value column
* pairs.
* This class expects 1 to N row results for a query, with each row containing 1 to N name
* value attribute mappings and the userName of the user the attributes are for. This contrasts
* {@link SingleRowJdbcPersonAttributeDao} which expects
* a single row result for a user query.
*
* @author Eric Dalquist
* @since 7.1.0
*/
@Slf4j
@Getter
public class MultiRowJdbcPersonAttributeDao extends AbstractJdbcPersonAttributeDao
© 2015 - 2025 Weber Informatics LLC | Privacy Policy