src/org/ohmage/domain/campaign/Campaign.java
public boolean isPromptInRepeatableSet(
			final String surveyId, 
			final String promptId) 
			throws DomainException {
		
		if(surveyId == null) {
			throw new DomainException("The survey ID is null.");
		}
		else if(promptId == null) {
			throw new DomainException("The prompt ID is null.");
		}
		
		Survey survey = surveyMap.get(surveyId);
		if(survey == null) {
			throw new DomainException("The survey ID is unknown.");
		}
		
		Map<Integer, SurveyItem> prompts = survey.getSurveyItems();
		for(SurveyItem prompt : prompts.values()) {
			if(prompt instanceof RepeatableSet) {
				Prompt currPrompt = ((RepeatableSet) prompt).getPrompt(promptId);
				
				if(currPrompt != null) {
					return true;
				}
			}
		}
        
        return false;
	}
/**
	 * Returns whether or not the prompt is in a repeatable set.
	 * 
	 * @param surveyId The survey's configuration-unique identifier.
	 * 
	 * @param promptId The prompt's configuration-unique identifier.
	 * 
	 * @return Whether or not the prompt is in a repeatable set.
	 * 
	 * @throws DomainException Thrown if the survey ID or repeatable set ID are
	 * 						   null or if the survey doesn't exist in this 
	 * 						   configuration or if the prompt doesn't exist in
	 * 						   that survey.
	 */
Returns whether or not the prompt is in a repeatable set.

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

@param promptId The prompt's configuration-unique identifier.

@return Whether or not the prompt is in a repeatable set.

@throws DomainException Thrown if the survey ID or repeatable set ID are
null or if the survey doesn't exist in this
configuration or if the prompt doesn't exist in
that survey.
Returns whether or not the prompt is in a repeatable set . @param surveyId The survey ' s configuration - unique identifier . @param promptId The prompt ' s configuration - unique identifier . @return Whether or not the prompt is in a repeatable set . @throws DomainException Thrown if the survey ID or repeatable set ID are null or if the survey doesn ' t exist in this configuration or if the prompt doesn ' t exist in that survey .
public boolean isPromptInRepeatableSet(
			final String surveyId, 
			final String promptId) 
			throws DomainException {
		if(surveyId == null) {
			throw new DomainException("The survey ID is null.");
		}
		else if(promptId == null) {
			throw new DomainException("The prompt ID is null.");
		}
		Survey survey = surveyMap.get(surveyId);
		if(survey == null) {
			throw new DomainException("The survey ID is unknown.");
		}
		Map<Integer, SurveyItem> prompts = survey.getSurveyItems();
		for(SurveyItem prompt : prompts.values()) {
			if(prompt instanceof RepeatableSet) {
				Prompt currPrompt = ((RepeatableSet) prompt).getPrompt(promptId);
				if(currPrompt != null) {
					return true;
				}
			}
		}
        return false;
	}
public boolean isPromptInRepeatableSet ( final String surveyId , final String promptId ) throws DomainException { if ( surveyId == null ) { throw new DomainException ( "The survey ID is null." ) ; } else if ( promptId == null ) { throw new DomainException ( "The prompt ID is null." ) ; } Survey survey = surveyMap . get ( surveyId ) ; if ( survey == null ) { throw new DomainException ( "The survey ID is unknown." ) ; } Map < Integer , SurveyItem > prompts = survey . getSurveyItems ( ) ; for ( SurveyItem prompt : prompts . values ( ) ) { if ( prompt instanceof RepeatableSet ) { Prompt currPrompt = ( ( RepeatableSet ) prompt ) . getPrompt ( promptId ) ; if ( currPrompt != null ) { return true ; } } } return false ; }
Returns whether or not the prompt is in a repeatable set.
Returns whether or not the prompt is in a repeatable set .