src/org/ohmage/service/ClassServices.java
public void checkDeleteClassCauseOrphanCampaigns(final String classId) 
			throws ServiceException {
		
		try {
			// get a list of orphan campaigns if a class is to be deleted.
			Collection<String> orphanCampaigns = classQueries.getOrphanCampaignsIfClassIsDeleted(classId); 
			
			if (! orphanCampaigns.isEmpty()){	
				throw new ServiceException(ErrorCode.CLASS_ORPHAN_CAMPAIGNS, 
						"Deleting class " + classId + 
						" will result in " + orphanCampaigns.size() + 
						" orphan campaigns: " + orphanCampaigns.toString());
			}
		} catch (DataAccessException e) {
			throw new ServiceException(e);
		}
	}
/**
	 * Check whether deleting this class will result in orphan campaigns.
	 * 
	 * @param classId The unique identifier or the class to be deleted.
	 * 
	 * @throws ServiceException Thrown if there is an error.
	 */
Check whether deleting this class will result in orphan campaigns.

@param classId The unique identifier or the class to be deleted.

@throws ServiceException Thrown if there is an error.
Check whether deleting this class will result in orphan campaigns . @param classId The unique identifier or the class to be deleted . @throws ServiceException Thrown if there is an error .
public void checkDeleteClassCauseOrphanCampaigns(final String classId) 
			throws ServiceException {
		try {
			Collection<String> orphanCampaigns = classQueries.getOrphanCampaignsIfClassIsDeleted(classId); 
			if (! orphanCampaigns.isEmpty()){	
				throw new ServiceException(ErrorCode.CLASS_ORPHAN_CAMPAIGNS, 
						"Deleting class " + classId + 
						" will result in " + orphanCampaigns.size() + 
						" orphan campaigns: " + orphanCampaigns.toString());
			}
		} catch (DataAccessException e) {
			throw new ServiceException(e);
		}
	}
public void checkDeleteClassCauseOrphanCampaigns ( final String classId ) throws ServiceException { try { Collection < String > orphanCampaigns = classQueries . getOrphanCampaignsIfClassIsDeleted ( classId ) ; if ( ! orphanCampaigns . isEmpty ( ) ) { throw new ServiceException ( ErrorCode . CLASS_ORPHAN_CAMPAIGNS , "Deleting class " + classId + " will result in " + orphanCampaigns . size ( ) + " orphan campaigns: " + orphanCampaigns . toString ( ) ) ; } } catch ( DataAccessException e ) { throw new ServiceException ( e ) ; } }
Check whether deleting this class will result in orphan campaigns.
Check whether deleting this class will result in orphan campaigns .
// get a list of orphan campaigns if a class is to be deleted.