ds.setUrl(info.getUrl());
source = ds;
}
final JdbcPersonAttributeDaoImpl jdbcImpl = new JdbcPersonAttributeDaoImpl(source, QUERY_ATTRIBUTE_LIST, sql);
// Map from JDBC column names to Sets of Strings representing uPortal
// attribute names.
final Map jdbcToPortalAttribs = new HashMap();
final String[] columnNames = info.getAttributenames();
final String[] portalAttribNames = info.getAttributealiases();
for (int i = 0; i < columnNames.length; i++) {
final String columnName = columnNames[i];
if (columnName != null && columnName.length() > 0){
Set attributeNames = (Set)jdbcToPortalAttribs.get(columnName);
if (attributeNames == null)
attributeNames = new HashSet();
attributeNames.add(portalAttribNames[i]);
jdbcToPortalAttribs.put(columnName, attributeNames);
}
}
jdbcImpl.setColumnsToAttributes(jdbcToPortalAttribs);
jdbcImpl.setDefaultAttributeName(QUERY_ATTRIBUTE);
return jdbcImpl;
}