
/*************************************************************
 * Copyright 2006, The First American Corporation
 *
 * Generated by jsModelGen
 *
 *************************************************************/

if ((top.modelInitialized == "undefined") || (top.modelInitialized != true))
{
	/*************************************************************************
	 *
	 *
	 * State class definition.
	 *
	 */
	function State(stateCodeArg, stateNameArg, noteArg)
	{
		this.stateCode = stateCodeArg;
		this.stateName = stateNameArg;
		this.note = noteArg;
		this.selectedGroupId = 0;
		this.selectedGroupName = '';
		this.selectedCountyId = 0;
		this.selectedCountyName = '';
		this.countyGroupList = new Array();
	}

	/*
	 * StateCode
	 */
	State.prototype.getStateCode = function()
	{
		return this.stateCode;
	}
	State.prototype.setStateCode = function(stateCodeArg)
	{
		this.stateCode = stateCodeArg;
	}

	/*
	 * StateName
	 */
	State.prototype.getStateName = function()
	{
		return this.stateName;
	}
	State.prototype.setStateName = function(stateNameArg)
	{
		this.stateName = stateNameArg;
	}

	/*
	 * Note
	 */
	State.prototype.getNote = function()
	{
		return this.note;
	}
	State.prototype.setNote = function(noteArg)
	{
		this.note = noteArg;
	}

	/*
	 * SelectedGroupId
	 */
	State.prototype.getSelectedGroupId = function()
	{
		return this.selectedGroupId;
	}
	State.prototype.setSelectedGroupId = function(selectedGroupIdArg)
	{
		this.selectedGroupId = selectedGroupIdArg;
	}

	/*
	 * SelectedCountyId
	 */
	State.prototype.getSelectedCountyId = function()
	{
		return this.selectedCountyId;
	}
	State.prototype.setSelectedCountyId = function(selectedCountyIdArg)
	{
		this.selectedCountyId = selectedCountyIdArg;
	}

	/*
	 * SelectedGroupName
	 */
	State.prototype.getSelectedGroupName = function()
	{
		return this.selectedGroupName;
	}
	State.prototype.setSelectedGroupName = function(selectedGroupNameArg)
	{
		this.selectedGroupName = selectedGroupNameArg;
	}

	/*
	 * SelectedCountyName
	 */
	State.prototype.getSelectedCountyName = function()
	{
		return this.selectedCountyName;
	}
	State.prototype.setSelectedCountyName = function(selectedCountyNameArg)
	{
		this.selectedCountyName = selectedCountyNameArg;
	}
	
	/*
	 * Setting both SelectedCountyId & SelectedGroupId by passing in countyName
	 */
	State.prototype.setSelectedIds = function(countyName)
	{
		this.selectedCountyId = 0;
		this.selectedCountyName = '';
		this.selectedGroupId = 0;
		this.selectedGroupName = '';
		for (var i=0; i<this.countyGroupList.length; i++) {
			var countyList = this.countyGroupList[i].getCountyList();
			for (var j=0; j<countyList.length; j++) {
				if (countyList[j].getCountyName() == countyName) {
					this.selectedCountyId = countyList[j].getFips();
					this.selectedCountyName = countyList[j].getCountyName();
					this.selectedGroupId = this.countyGroupList[i].getGroupId();
					this.selectedGroupName = this.countyGroupList[i].getName();
					break;
				}				
			}				
		}
	}
	
	/*
	 * CountyGroupList
	 */
	State.prototype.getCountyGroup = function(index)
	{
		return this.countyGroupList[index];
	}
	State.prototype.addCountyGroup = function(countyGroup)
	{
		this.countyGroupList.push(countyGroup);
	}
	State.prototype.getCountyGroupList = function()
	{
		return this.countyGroupList;
	}
	State.prototype.setCountyGroupList = function(countyGroupListArg)
	{
		this.countyGroupList = countyGroupListArg;
	}

	/*************************************************************************
	 *
	 *
	 * CountyGroup class definition.
	 *
	 */
	function CountyGroup(groupIdArg, nameArg, stateCodeArg, defaultFipsArg)
	{
		this.groupId = groupIdArg;
		this.name = nameArg;
		this.stateCode = stateCodeArg;
		this.defaultFips = defaultFipsArg;
		this.countyList = new Array();
	}

	/*
	 * GroupId
	 */
	CountyGroup.prototype.getGroupId = function()
	{
		return this.groupId;
	}
	CountyGroup.prototype.setGroupId = function(groupIdArg)
	{
		this.groupId = groupIdArg;
	}

	/*
	 * Name
	 */
	CountyGroup.prototype.getName = function()
	{
		return this.name;
	}
	CountyGroup.prototype.setName = function(nameArg)
	{
		this.name = nameArg;
	}

	/*
	 * StateCode
	 */
	CountyGroup.prototype.getStateCode = function()
	{
		return this.stateCode;
	}
	CountyGroup.prototype.setStateCode = function(stateCodeArg)
	{
		this.stateCode = stateCodeArg;
	}

	/*
	 * DefaultFips
	 */
	CountyGroup.prototype.getDefaultFips = function()
	{
		return this.defaultFips;
	}
	CountyGroup.prototype.setDefaultFips = function(defaultFipsArg)
	{
		this.defaultFips = defaultFipsArg;
	}

	/*
	 * CountyList
	 */
	CountyGroup.prototype.getCounty = function(index)
	{
		return this.countyList[index];
	}
	CountyGroup.prototype.addCounty = function(county)
	{
		this.countyList.push(county);
	}
	CountyGroup.prototype.getCountyList = function()
	{
		return this.countyList;
	}
	CountyGroup.prototype.setCountyList = function(countyListArg)
	{
		this.countyList = countyListArg;
	}


	/*************************************************************************
	 *
	 *
	 * County class definition.
	 *
	 */
	function County(fipsArg, stateCodeArg, countyNameArg, countyGroupIdArg)
	{
		this.fips = fipsArg;
		this.stateCode = stateCodeArg;
		this.countyName = countyNameArg;
		this.countyGroupId = countyGroupIdArg;
	}

	/*
	 * Fips
	 */
	County.prototype.getFips = function()
	{
		return this.fips;
	}
	County.prototype.setFips = function(fipsArg)
	{
		this.fips = fipsArg;
	}

	/*
	 * StateCode
	 */
	County.prototype.getStateCode = function()
	{
		return this.stateCode;
	}
	County.prototype.setStateCode = function(stateCodeArg)
	{
		this.stateCode = stateCodeArg;
	}

	/*
	 * CountyName
	 */
	County.prototype.getCountyName = function()
	{
		return this.countyName;
	}
	County.prototype.setCountyName = function(countyNameArg)
	{
		this.countyName = countyNameArg;
	}

	/*
	 * CountyGroupId
	 */
	County.prototype.getCountyGroupId = function()
	{
		return this.countyGroupId;
	}
	County.prototype.setCountyGroupId = function(countyGroupIdArg)
	{
		this.countyGroupId = countyGroupIdArg;
	}


	/*************************************************************************
	 *
	 *
	 * Question class definition.
	 *
	 */
	function Question(questionIdArg, questionDescArg, questionNoteArg, answerTypeArg, activeArg, paramNameArg, answerListArg)
	{
		this.questionId = questionIdArg;
		this.questionDesc = questionDescArg;
		this.questionNote = questionNoteArg;
		this.answerType = answerTypeArg;
		this.active = activeArg;
		this.paramName = paramNameArg;
		this.answerList = answerListArg;
		this.selectedAnswerId = 0;
	}

	/*
	 * QuestionId
	 */
	Question.prototype.getQuestionId = function()
	{
		return this.questionId;
	}
	Question.prototype.setQuestionId = function(questionIdArg)
	{
		this.questionId = questionIdArg;
	}

	/*
	 * QuestionDesc
	 */
	Question.prototype.getQuestionDesc = function()
	{
		return this.questionDesc;
	}
	Question.prototype.setQuestionDesc = function(questionDescArg)
	{
		this.questionDesc = questionDescArg;
	}

	/*
	 * QuestionNote
	 */
	Question.prototype.getQuestionNote = function()
	{
		return this.questionNote;
	}
	Question.prototype.setQuestionNote = function(questionNoteArg)
	{
		this.questionNote = questionNoteArg;
	}

	/*
	 * AnswerType
	 */
	Question.prototype.getAnswerType = function()
	{
		return this.answerType;
	}
	Question.prototype.setAnswerType = function(answerTypeArg)
	{
		this.answerType = answerTypeArg;
	}

	/*
	 * Active
	 */
	Question.prototype.isActive = function()
	{
		return this.active;
	}
	Question.prototype.setActive = function(activeArg)
	{
		this.active = activeArg;
	}

	/*
	 * ParamName
	 */
	Question.prototype.getParamName = function()
	{
		return this.paramName;
	}
	Question.prototype.setParamName = function(paramNameArg)
	{
		this.paramName = paramNameArg;
	}

	/*
	 * AnswerList
	 */
	Question.prototype.getAnswer = function(index)
	{
		return this.answerList[index];
	}
	Question.prototype.addAnswer = function(answer)
	{
		this.answerList.push(answer);
	}
	Question.prototype.getAnswerList = function()
	{
		return this.answerList;
	}
	Question.prototype.setAnswerList = function(answerListArg)
	{
		this.answerList = answerListArg;
	}

	/*
	 * SelectedAnswerId
	 */
	Question.prototype.getSelectedAnswerId = function()
	{
		return this.selectedAnswerId;
	}
	Question.prototype.setSelectedAnswerId = function(selectedAnswerIdArg)
	{
		this.selectedAnswerId = selectedAnswerIdArg;
	}


	/*************************************************************************
	 *
	 *
	 * Answer class definition.
	 *
	 */
	function Answer(answerIdArg, answerDescArg, answerNoteArg, defaultParameterString, parameterValueArg, nextQuestionArg)
	{
		this.answerId = answerIdArg;
		this.answerDesc = answerDescArg;
		this.answerNote = answerNoteArg;
		this.defaultParameterString = defaultParameterString;
		this.parameterValue = parameterValueArg;
		this.nextQuestion = nextQuestionArg;
		this.value = "";
	}

	/*
	 * AnswerId
	 */
	Answer.prototype.getAnswerId = function()
	{
		return this.answerId;
	}
	Answer.prototype.setAnswerId = function(answerIdArg)
	{
		this.answerId = answerIdArg;
	}

	/*
	 * AnswerDesc
	 */
	Answer.prototype.getAnswerDesc = function()
	{
		return this.answerDesc;
	}
	Answer.prototype.setAnswerDesc = function(answerDescArg)
	{
		this.answerDesc = answerDescArg;
	}

	/*
	 * AnswerNote
	 */
	Answer.prototype.getAnswerNote = function()
	{
		return this.answerNote;
	}
	Answer.prototype.setAnswerNote = function(answerNoteArg)
	{
		this.answerNote = answerNoteArg;
	}

	/*
	 * DefaultParameterString
	 */
	Answer.prototype.getDefaultParameterString = function()
	{
		return this.defaultParameterString;
	}
	Answer.prototype.setDefaultParameterString = function(defaultParameterString)
	{
		this.defaultParameterString = defaultParameterString;
	}

	/*
	 * ParameterValue
	 */
	Answer.prototype.getParameterValue = function()
	{
		return this.parameterValue;
	}
	Answer.prototype.setParameterValue = function(parameterValueArg)
	{
		this.parameterValue = parameterValueArg;
	}

	/*
	 * NextQuestion
	 */
	Answer.prototype.getNextQuestion = function()
	{
		return this.nextQuestion;
	}
	Answer.prototype.setNextQuestion = function(nextQuestionArg)
	{
		this.nextQuestion = nextQuestionArg;
	}

	/*
	 * Value
	 */
	Answer.prototype.getValue = function()
	{
		return this.value.replace(/^\$|,/g, "");
	}
	Answer.prototype.setValue = function(valueArg)
	{
		this.value = valueArg;
	}


	/*************************************************************************
	 *
	 *
	 * Endorsement class definition.
	 *
	 */
	function Endorsement(endorsementIdArg, NRFCEndorsementIdArg, endorsementDescArg, stateCodeArg, coverageTypeArg, paramNameListArg, selectedArg)
	{
		this.endorsementId = endorsementIdArg;
		this.NRFCEndorsementId = NRFCEndorsementIdArg;
		this.endorsementDesc = endorsementDescArg;
		this.stateCode = stateCodeArg;
		this.coverageType = coverageTypeArg;
		this.paramNameList = paramNameListArg;
		this.selected = selectedArg;
	}

	/*
	 * EndorsementId
	 */
	Endorsement.prototype.getEndorsementId = function()
	{
		return this.endorsementId;
	}
	Endorsement.prototype.setEndorsementId = function(endorsementIdArg)
	{
		this.endorsementId = endorsementIdArg;
	}

	/*
	 * NRFCEndorsementId
	 */
	Endorsement.prototype.getNRFCEndorsementId = function()
	{
		return this.NRFCEndorsementId;
	}
	Endorsement.prototype.setNRFCEndorsementId = function(NRFCEndorsementIdArg)
	{
		this.NRFCEndorsementId = NRFCEndorsementIdArg;
	}

	/*
	 * EndorsementDesc
	 */
	Endorsement.prototype.getEndorsementDesc = function()
	{
		return this.endorsementDesc;
	}
	Endorsement.prototype.setEndorsementDesc = function(endorsementDescArg)
	{
		this.endorsementDesc = endorsementDescArg;
	}

	/*
	 * StateCode
	 */
	Endorsement.prototype.getStateCode = function()
	{
		return this.stateCode;
	}
	Endorsement.prototype.setStateCode = function(stateCodeArg)
	{
		this.stateCode = stateCodeArg;
	}

	/*
	 * CoverageType
	 */
	Endorsement.prototype.getCoverageType = function()
	{
		return this.coverageType;
	}
	Endorsement.prototype.setCoverageType = function(coverageTypeArg)
	{
		this.coverageType = coverageTypeArg;
	}

	/*
	 * ParamNameList
	 */
	Endorsement.prototype.getParamName = function(index)
	{
		return this.paramNameList[index];
	}
	Endorsement.prototype.addParamName = function(paramName)
	{
		this.paramNameList.push(paramName);
	}
	Endorsement.prototype.getParamNameList = function()
	{
		return this.paramNameList;
	}
	Endorsement.prototype.setParamNameList = function(paramNameListArg)
	{
		this.paramNameList = paramNameListArg;
	}

	/*
	 * Selected
	 */
	Endorsement.prototype.isSelected = function()
	{
		return this.selected;
	}
	Endorsement.prototype.setSelected = function(selectedArg)
	{
		this.selected = selectedArg;
	}


	/*************************************************************************
	 *
	 *
	 * Rate class definition.
	 *
	 */
	function Rate(idArg, nameArg, valueArg)
	{
		this.id = idArg;
		this.name = nameArg;
		this.value = valueArg;
	}

	/*
	 * Id
	 */
	Rate.prototype.getId = function()
	{
		return this.id;
	}
	Rate.prototype.setId = function(idArg)
	{
		this.id = idArg;
	}

	/*
	 * Name
	 */
	Rate.prototype.getName = function()
	{
		return this.name;
	}
	Rate.prototype.setName = function(nameArg)
	{
		this.name = nameArg;
	}

	/*
	 * Value
	 */
	Rate.prototype.getValue = function()
	{
		return this.value;
	}
	Rate.prototype.setValue = function(valueArg)
	{
		this.value = valueArg;
	}
}
