Configuration.getConnectionPool().executeQuery(qp);
roleList = qp.getResults(String.class, "name");
if( roleList == null )
{
throw new NoUserRolesException("Database errors prevented retrieval of role names for user");
}
for( int i = 0; i < qp.getResultCount(); i++)
{
ArrayList results = qp.getRowResults(i);
userRoles.append( results.get(0).toString() + " (" + results.get(1).toString() + ")|" );
}
/*for( String role: roleList )
{
userRoles.append( role + "|" );
}*/
roleNames = userRoles.toString();
// get rid of last pipe
roleNames = roleNames.substring( 0, roleNames.lastIndexOf("|") );
Logger.debug("\n\n role names pipe del after last pipe removed: " + roleNames + "\n\n");
}
catch(SQLException ex)
{
Logger.error("\n\n Database errors prevented retrieval of role names for user", ex);
throw new NoUserRolesException("Database errors prevented retrieval of role names for user");
}
catch(DataTypeMismatchException dtmmex)
{
Logger.debug("\n\n data type mismatch exception occurred trying to retrieve role names for user - PSQLRoleDAO.getUserRoleNames \n");
}