src/org/ohmage/query/impl/UserCampaignQueries.java
@Override
						public Map<String, Set<Role>> extractData(
								final ResultSet rs)
								throws SQLException,
								org.springframework.dao.DataAccessException {
							
							Map<String, Set<Campaign.Role>> result =
									new HashMap<String, Set<Campaign.Role>>();
							
							while(rs.next()) {
								Set<Campaign.Role> roles =
										result.get(rs.getString("urn"));
								
								if(roles == null) {
									roles = new HashSet<Campaign.Role>();
									result.put(rs.getString("urn"), roles);
								}
								
								try {
									roles.add(
											Campaign.Role.getValue(
													rs.getString("role")));
								}
								catch(IllegalArgumentException e) {
									throw new SQLException(
											"The role is not a valid role.",
											e);
								}
							}
							
							return result;
						}
/**
						 * Extracts the data combining the roles into the same
						 * set. 
						 */
Extracts the data combining the roles into the same
set.
Extracts the data combining the roles into the same set .
@Override
						public Map<String, Set<Role>> extractData(
								final ResultSet rs)
								throws SQLException,
								org.springframework.dao.DataAccessException {
							Map<String, Set<Campaign.Role>> result =
									new HashMap<String, Set<Campaign.Role>>();
							while(rs.next()) {
								Set<Campaign.Role> roles =
										result.get(rs.getString("urn"));
								if(roles == null) {
									roles = new HashSet<Campaign.Role>();
									result.put(rs.getString("urn"), roles);
								}
								try {
									roles.add(
											Campaign.Role.getValue(
													rs.getString("role")));
								}
								catch(IllegalArgumentException e) {
									throw new SQLException(
											"The role is not a valid role.",
											e);
								}
							}
							return result;
						}
@ Override public Map < String , Set < Role > > extractData ( final ResultSet rs ) throws SQLException , org . springframework . dao . DataAccessException { Map < String , Set < Campaign . Role > > result = new HashMap < String , Set < Campaign . Role > > ( ) ; while ( rs . next ( ) ) { Set < Campaign . Role > roles = result . get ( rs . getString ( "urn" ) ) ; if ( roles == null ) { roles = new HashSet < Campaign . Role > ( ) ; result . put ( rs . getString ( "urn" ) , roles ) ; } try { roles . add ( Campaign . Role . getValue ( rs . getString ( "role" ) ) ) ; } catch ( IllegalArgumentException e ) { throw new SQLException ( "The role is not a valid role." , e ) ; } } return result ; }
Extracts the data combining the roles into the same
 set.
Extracts the data combining the roles into the same set .