src/org/ohmage/domain/campaign/Campaign.java
public int numberOfPromptsInRepeatableSet(
			final String surveyId, 
			final String repeatableSetId) 
			throws DomainException {
		
		if(surveyId == null) {
			throw new DomainException("The survey ID is null.");
		}
		else if(repeatableSetId == null) {
			throw new DomainException("The repeatable set ID is null.");
		}
		
		Survey survey = surveyMap.get(surveyId);
		if(survey == null) {
			throw new DomainException("There is no survey with the ID: " + surveyId);
		}
		
		SurveyItem prompt = survey.getSurveyItems().get(repeatableSetId);
		if(prompt instanceof RepeatableSet) {
			RepeatableSet repeatableSet = (RepeatableSet) prompt;
			
			return repeatableSet.getNumPrompts();
		}
		else if(prompt == null) {
			throw new DomainException("There is no prompt with the ID: " + repeatableSetId);
		}
		else {
			throw new DomainException("The prompt is not a repeatable set: " + repeatableSetId);
		}
	}
/**
	 * Retrieves the number of prompts in some repeatable set.
	 * 
	 * @param surveyId The survey's configuration-unique identifier.
	 * 
	 * @param repeatableSetId The repeatable set's configuration-unique 
	 * 						  identifier.
	 * 
	 * @return The number of prompts in the repeatable set.
	 * 
	 * @throws DomainException Thrown if the survey ID or repeatable set ID is 
	 * 						   null or if the survey ID or prompt ID are 
	 * 						   unknown or if the repeatable set ID doesn't 
	 * 						   refer to a repeatable set.
	 */
Retrieves the number of prompts in some repeatable set.

@param surveyId The survey's configuration-unique identifier.

@param repeatableSetId The repeatable set's configuration-unique
identifier.

@return The number of prompts in the repeatable set.

@throws DomainException Thrown if the survey ID or repeatable set ID is
null or if the survey ID or prompt ID are
unknown or if the repeatable set ID doesn't
refer to a repeatable set.
Retrieves the number of prompts in some repeatable set . @param surveyId The survey ' s configuration - unique identifier . @param repeatableSetId The repeatable set ' s configuration - unique identifier . @return The number of prompts in the repeatable set . @throws DomainException Thrown if the survey ID or repeatable set ID is null or if the survey ID or prompt ID are unknown or if the repeatable set ID doesn ' t refer to a repeatable set .
public int numberOfPromptsInRepeatableSet(
			final String surveyId, 
			final String repeatableSetId) 
			throws DomainException {
		if(surveyId == null) {
			throw new DomainException("The survey ID is null.");
		}
		else if(repeatableSetId == null) {
			throw new DomainException("The repeatable set ID is null.");
		}
		Survey survey = surveyMap.get(surveyId);
		if(survey == null) {
			throw new DomainException("There is no survey with the ID: " + surveyId);
		}
		SurveyItem prompt = survey.getSurveyItems().get(repeatableSetId);
		if(prompt instanceof RepeatableSet) {
			RepeatableSet repeatableSet = (RepeatableSet) prompt;
			return repeatableSet.getNumPrompts();
		}
		else if(prompt == null) {
			throw new DomainException("There is no prompt with the ID: " + repeatableSetId);
		}
		else {
			throw new DomainException("The prompt is not a repeatable set: " + repeatableSetId);
		}
	}
public int numberOfPromptsInRepeatableSet ( final String surveyId , final String repeatableSetId ) throws DomainException { if ( surveyId == null ) { throw new DomainException ( "The survey ID is null." ) ; } else if ( repeatableSetId == null ) { throw new DomainException ( "The repeatable set ID is null." ) ; } Survey survey = surveyMap . get ( surveyId ) ; if ( survey == null ) { throw new DomainException ( "There is no survey with the ID: " + surveyId ) ; } SurveyItem prompt = survey . getSurveyItems ( ) . get ( repeatableSetId ) ; if ( prompt instanceof RepeatableSet ) { RepeatableSet repeatableSet = ( RepeatableSet ) prompt ; return repeatableSet . getNumPrompts ( ) ; } else if ( prompt == null ) { throw new DomainException ( "There is no prompt with the ID: " + repeatableSetId ) ; } else { throw new DomainException ( "The prompt is not a repeatable set: " + repeatableSetId ) ; } }
Retrieves the number of prompts in some repeatable set.
Retrieves the number of prompts in some repeatable set .