src/org/ohmage/service/ClassServices.java
public Map<String, Map<String, Clazz.Role>> generateClassRoster(
			final String username,
			final Collection<String> classIds) 
			throws ServiceException {
		
		try {
			Map<String, Map<String, Clazz.Role>> result = 
					new HashMap<String, Map<String, Clazz.Role>>();
			
			for(String classId : classIds) {
				result.put(classId, classQueries.getUserRolePairs(username, classId));
			}
			
			return result;
		}
		catch(DataAccessException e) {
			throw new ServiceException(e);
		}
	}
/**
	 * Generates a Map of class IDs to a List of users and their roles for a 
	 * List of classes.
	 * 
	 * @param classIds A List of unique identifiers for the classes that should
	 * 				   be added to the roster.
	 * 
	 * @return A Map of class IDs to a List of users and their roles in that
	 * 		   class.
	 * 
	 * @throws ServiceException Thrown if there is an error.
	 */
Generates a Map of class IDs to a List of users and their roles for a
List of classes.

@param classIds A List of unique identifiers for the classes that should
be added to the roster.

@return A Map of class IDs to a List of users and their roles in that
class.

@throws ServiceException Thrown if there is an error.
Generates a Map of class IDs to a List of users and their roles for a List of classes . @param classIds A List of unique identifiers for the classes that should be added to the roster . @return A Map of class IDs to a List of users and their roles in that class . @throws ServiceException Thrown if there is an error .
public Map<String, Map<String, Clazz.Role>> generateClassRoster(
			final String username,
			final Collection<String> classIds) 
			throws ServiceException {
		try {
			Map<String, Map<String, Clazz.Role>> result = 
					new HashMap<String, Map<String, Clazz.Role>>();
			for(String classId : classIds) {
				result.put(classId, classQueries.getUserRolePairs(username, classId));
			}
			return result;
		}
		catch(DataAccessException e) {
			throw new ServiceException(e);
		}
	}
public Map < String , Map < String , Clazz . Role > > generateClassRoster ( final String username , final Collection < String > classIds ) throws ServiceException { try { Map < String , Map < String , Clazz . Role > > result = new HashMap < String , Map < String , Clazz . Role > > ( ) ; for ( String classId : classIds ) { result . put ( classId , classQueries . getUserRolePairs ( username , classId ) ) ; } return result ; } catch ( DataAccessException e ) { throw new ServiceException ( e ) ; } }
Generates a Map of class IDs to a List of users and their roles for a
 List of classes.
Generates a Map of class IDs to a List of users and their roles for a List of classes .