Java Code Examples for ims.assessment.vo.GraphicAssessmentFindingQuestionVo

The following are top voted examples for showing how to use ims.assessment.vo.GraphicAssessmentFindingQuestionVo. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean removeQuestionWithStages()
{
	boolean rowDataRemoved = false;
	GraphicAssessmentFindingQuestionVo voGAFQuestion = form.lyrDetails().tabFindingsWithStages().grdFindingQuestionsWithStage().getValue();
	DynamicGridRow dynamicRow = form.lyrDetails().tabFindingsWithStages().dyngrdFindingWithStage().getSelectedRow();
	if (dynamicRow != null)
	{
		Object objValue = dynamicRow.getValue();
		if (objValue != null && objValue instanceof FindingStageQuestionsVo)
		{
			FindingStageQuestionsVo voFsq = (FindingStageQuestionsVo) objValue;
			if (voFsq.getAssociatedQuestionsIsNotNull())
			{
				int questionIndex = voFsq.getAssociatedQuestions().indexOf(voGAFQuestion);
				if (questionIndex >= 0)
				{
					voFsq.getAssociatedQuestions().remove(voGAFQuestion);
					rowDataRemoved = true;
				}
			}
		}
	}
	return rowDataRemoved;
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
/**
 * @return
 */
private boolean removeRowData()
{
	boolean rowDataRemoved = false;
	GraphicAssessmentFindingQuestionVo voGAFQuestion = form.lyrDetails().tabFindings().grdFindingQuestions().getValue();
	DynamicGridRow dynamicRow = form.lyrDetails().tabFindings().dyngrdAssessmentFindings().getSelectedRow();
	if (dynamicRow != null)
	{
		Object objValue = dynamicRow.getValue();
		if (objValue != null && objValue instanceof GraphicAssessmentFindingVo)
		{
			GraphicAssessmentFindingVo voGAFinding = (GraphicAssessmentFindingVo) objValue;
			if (voGAFinding.getFindingStageIsNotNull() &&  voGAFinding.getFindingStage().get(0).getAssociatedQuestionsIsNotNull())
			{
				int questionIndex = voGAFinding.getFindingStage().get(0).getAssociatedQuestions().indexOf(voGAFQuestion);
				if (questionIndex >= 0)
				{
					voGAFinding.getFindingStage().get(0).getAssociatedQuestions().remove(voGAFQuestion);
					rowDataRemoved = true;
				}
			}
		}
	}
	return rowDataRemoved;
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private PatientGraphicAssessmentFindingQuestionAnswerVo findOrCreateAnswer(PatientGraphicAssessmentFindingQuestionAnswerVoCollection answers, GraphicAssessmentFindingQuestionVo question)
{
	if (answers == null || question == null)
		return new PatientGraphicAssessmentFindingQuestionAnswerVo();

	for (int x = 0; x < answers.size(); x++)
	{
		PatientGraphicAssessmentFindingQuestionAnswerVo answer = answers.get(x);
		if (answer != null && answer.getGraphicFindingQuestionIsNotNull() && answer.getGraphicFindingQuestion().equals(question))
		{
			return answer;
		}
	}

	return new PatientGraphicAssessmentFindingQuestionAnswerVo();
}
 
Example 4
Project: AvoinApotti   File: UserAssessmentInstHelper.java   Source Code and License 6 votes vote down vote up
private PatientGraphicAssessmentFindingQuestionAnswerVo findOrCreateAnswer(PatientGraphicAssessmentFindingQuestionAnswerVoCollection answers, GraphicAssessmentFindingQuestionVo question)
{
	if(answers == null || question == null)
		return new PatientGraphicAssessmentFindingQuestionAnswerVo();
	
	for(int x = 0; x < answers.size(); x++)
	{
		PatientGraphicAssessmentFindingQuestionAnswerVo answer = answers.get(x);
		if(answer != null 
				&& answer.getGraphicFindingQuestionIsNotNull()
				&& answer.getGraphicFindingQuestion().equals(question))
		{
			return answer;
		}
	}
	
	return new PatientGraphicAssessmentFindingQuestionAnswerVo();
}
 
Example 5
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean removeQuestionWithStages()
{
	boolean rowDataRemoved = false;
	GraphicAssessmentFindingQuestionVo voGAFQuestion = form.lyrDetails().tabFindingsWithStages().grdFindingQuestionsWithStage().getValue();
	DynamicGridRow dynamicRow = form.lyrDetails().tabFindingsWithStages().dyngrdFindingWithStage().getSelectedRow();
	if (dynamicRow != null)
	{
		Object objValue = dynamicRow.getValue();
		if (objValue != null && objValue instanceof FindingStageQuestionsVo)
		{
			FindingStageQuestionsVo voFsq = (FindingStageQuestionsVo) objValue;
			if (voFsq.getAssociatedQuestionsIsNotNull())
			{
				int questionIndex = voFsq.getAssociatedQuestions().indexOf(voGAFQuestion);
				if (questionIndex >= 0)
				{
					voFsq.getAssociatedQuestions().remove(voGAFQuestion);
					rowDataRemoved = true;
				}
			}
		}
	}
	return rowDataRemoved;
}
 
Example 6
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
/**
 * @return
 */
private boolean removeRowData()
{
	boolean rowDataRemoved = false;
	GraphicAssessmentFindingQuestionVo voGAFQuestion = form.lyrDetails().tabFindings().grdFindingQuestions().getValue();
	DynamicGridRow dynamicRow = form.lyrDetails().tabFindings().dyngrdAssessmentFindings().getSelectedRow();
	if (dynamicRow != null)
	{
		Object objValue = dynamicRow.getValue();
		if (objValue != null && objValue instanceof GraphicAssessmentFindingVo)
		{
			GraphicAssessmentFindingVo voGAFinding = (GraphicAssessmentFindingVo) objValue;
			if (voGAFinding.getFindingStageIsNotNull() &&  voGAFinding.getFindingStage().get(0).getAssociatedQuestionsIsNotNull())
			{
				int questionIndex = voGAFinding.getFindingStage().get(0).getAssociatedQuestions().indexOf(voGAFQuestion);
				if (questionIndex >= 0)
				{
					voGAFinding.getFindingStage().get(0).getAssociatedQuestions().remove(voGAFQuestion);
					rowDataRemoved = true;
				}
			}
		}
	}
	return rowDataRemoved;
}
 
Example 7
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private PatientGraphicAssessmentFindingQuestionAnswerVo findOrCreateAnswer(PatientGraphicAssessmentFindingQuestionAnswerVoCollection answers, GraphicAssessmentFindingQuestionVo question)
{
	if (answers == null || question == null)
		return new PatientGraphicAssessmentFindingQuestionAnswerVo();

	for (int x = 0; x < answers.size(); x++)
	{
		PatientGraphicAssessmentFindingQuestionAnswerVo answer = answers.get(x);
		if (answer != null && answer.getGraphicFindingQuestionIsNotNull() && answer.getGraphicFindingQuestion().equals(question))
		{
			return answer;
		}
	}

	return new PatientGraphicAssessmentFindingQuestionAnswerVo();
}
 
Example 8
Project: openMAXIMS   File: UserAssessmentInstHelper.java   Source Code and License 6 votes vote down vote up
private PatientGraphicAssessmentFindingQuestionAnswerVo findOrCreateAnswer(PatientGraphicAssessmentFindingQuestionAnswerVoCollection answers, GraphicAssessmentFindingQuestionVo question)
{
	if(answers == null || question == null)
		return new PatientGraphicAssessmentFindingQuestionAnswerVo();
	
	for(int x = 0; x < answers.size(); x++)
	{
		PatientGraphicAssessmentFindingQuestionAnswerVo answer = answers.get(x);
		if(answer != null 
				&& answer.getGraphicFindingQuestionIsNotNull()
				&& answer.getGraphicFindingQuestion().equals(question))
		{
			return answer;
		}
	}
	
	return new PatientGraphicAssessmentFindingQuestionAnswerVo();
}
 
Example 9
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean removeQuestionWithStages()
{
	boolean rowDataRemoved = false;
	GraphicAssessmentFindingQuestionVo voGAFQuestion = form.lyrDetails().tabFindingsWithStages().grdFindingQuestionsWithStage().getValue();
	DynamicGridRow dynamicRow = form.lyrDetails().tabFindingsWithStages().dyngrdFindingWithStage().getSelectedRow();
	if (dynamicRow != null)
	{
		Object objValue = dynamicRow.getValue();
		if (objValue != null && objValue instanceof FindingStageQuestionsVo)
		{
			FindingStageQuestionsVo voFsq = (FindingStageQuestionsVo) objValue;
			if (voFsq.getAssociatedQuestionsIsNotNull())
			{
				int questionIndex = voFsq.getAssociatedQuestions().indexOf(voGAFQuestion);
				if (questionIndex >= 0)
				{
					voFsq.getAssociatedQuestions().remove(voGAFQuestion);
					rowDataRemoved = true;
				}
			}
		}
	}
	return rowDataRemoved;
}
 
Example 10
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
/**
 * @return
 */
private boolean removeRowData()
{
	boolean rowDataRemoved = false;
	GraphicAssessmentFindingQuestionVo voGAFQuestion = form.lyrDetails().tabFindings().grdFindingQuestions().getValue();
	DynamicGridRow dynamicRow = form.lyrDetails().tabFindings().dyngrdAssessmentFindings().getSelectedRow();
	if (dynamicRow != null)
	{
		Object objValue = dynamicRow.getValue();
		if (objValue != null && objValue instanceof GraphicAssessmentFindingVo)
		{
			GraphicAssessmentFindingVo voGAFinding = (GraphicAssessmentFindingVo) objValue;
			if (voGAFinding.getFindingStageIsNotNull() &&  voGAFinding.getFindingStage().get(0).getAssociatedQuestionsIsNotNull())
			{
				int questionIndex = voGAFinding.getFindingStage().get(0).getAssociatedQuestions().indexOf(voGAFQuestion);
				if (questionIndex >= 0)
				{
					voGAFinding.getFindingStage().get(0).getAssociatedQuestions().remove(voGAFQuestion);
					rowDataRemoved = true;
				}
			}
		}
	}
	return rowDataRemoved;
}
 
Example 11
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private PatientGraphicAssessmentFindingQuestionAnswerVo findOrCreateAnswer(PatientGraphicAssessmentFindingQuestionAnswerVoCollection answers, GraphicAssessmentFindingQuestionVo question)
{
	if (answers == null || question == null)
		return new PatientGraphicAssessmentFindingQuestionAnswerVo();

	for (int x = 0; x < answers.size(); x++)
	{
		PatientGraphicAssessmentFindingQuestionAnswerVo answer = answers.get(x);
		if (answer != null && answer.getGraphicFindingQuestionIsNotNull() && answer.getGraphicFindingQuestion().equals(question))
		{
			return answer;
		}
	}

	return new PatientGraphicAssessmentFindingQuestionAnswerVo();
}
 
Example 12
Project: openMAXIMS   File: UserAssessmentInstHelper.java   Source Code and License 6 votes vote down vote up
private PatientGraphicAssessmentFindingQuestionAnswerVo findOrCreateAnswer(PatientGraphicAssessmentFindingQuestionAnswerVoCollection answers, GraphicAssessmentFindingQuestionVo question)
{
	if(answers == null || question == null)
		return new PatientGraphicAssessmentFindingQuestionAnswerVo();
	
	for(int x = 0; x < answers.size(); x++)
	{
		PatientGraphicAssessmentFindingQuestionAnswerVo answer = answers.get(x);
		if(answer != null 
				&& answer.getGraphicFindingQuestionIsNotNull()
				&& answer.getGraphicFindingQuestion().equals(question))
		{
			return answer;
		}
	}
	
	return new PatientGraphicAssessmentFindingQuestionAnswerVo();
}
 
Example 13
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean removeQuestionWithStages()
{
	boolean rowDataRemoved = false;
	GraphicAssessmentFindingQuestionVo voGAFQuestion = form.lyrDetails().tabFindingsWithStages().grdFindingQuestionsWithStage().getValue();
	DynamicGridRow dynamicRow = form.lyrDetails().tabFindingsWithStages().dyngrdFindingWithStage().getSelectedRow();
	if (dynamicRow != null)
	{
		Object objValue = dynamicRow.getValue();
		if (objValue != null && objValue instanceof FindingStageQuestionsVo)
		{
			FindingStageQuestionsVo voFsq = (FindingStageQuestionsVo) objValue;
			if (voFsq.getAssociatedQuestionsIsNotNull())
			{
				int questionIndex = voFsq.getAssociatedQuestions().indexOf(voGAFQuestion);
				if (questionIndex >= 0)
				{
					voFsq.getAssociatedQuestions().remove(voGAFQuestion);
					rowDataRemoved = true;
				}
			}
		}
	}
	return rowDataRemoved;
}
 
Example 14
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
/**
 * @return
 */
private boolean removeRowData()
{
	boolean rowDataRemoved = false;
	GraphicAssessmentFindingQuestionVo voGAFQuestion = form.lyrDetails().tabFindings().grdFindingQuestions().getValue();
	DynamicGridRow dynamicRow = form.lyrDetails().tabFindings().dyngrdAssessmentFindings().getSelectedRow();
	if (dynamicRow != null)
	{
		Object objValue = dynamicRow.getValue();
		if (objValue != null && objValue instanceof GraphicAssessmentFindingVo)
		{
			GraphicAssessmentFindingVo voGAFinding = (GraphicAssessmentFindingVo) objValue;
			if (voGAFinding.getFindingStageIsNotNull() &&  voGAFinding.getFindingStage().get(0).getAssociatedQuestionsIsNotNull())
			{
				int questionIndex = voGAFinding.getFindingStage().get(0).getAssociatedQuestions().indexOf(voGAFQuestion);
				if (questionIndex >= 0)
				{
					voGAFinding.getFindingStage().get(0).getAssociatedQuestions().remove(voGAFQuestion);
					rowDataRemoved = true;
				}
			}
		}
	}
	return rowDataRemoved;
}
 
Example 15
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private PatientGraphicAssessmentFindingQuestionAnswerVo findOrCreateAnswer(PatientGraphicAssessmentFindingQuestionAnswerVoCollection answers, GraphicAssessmentFindingQuestionVo question)
{
	if (answers == null || question == null)
		return new PatientGraphicAssessmentFindingQuestionAnswerVo();

	for (int x = 0; x < answers.size(); x++)
	{
		PatientGraphicAssessmentFindingQuestionAnswerVo answer = answers.get(x);
		if (answer != null && answer.getGraphicFindingQuestionIsNotNull() && answer.getGraphicFindingQuestion().equals(question))
		{
			return answer;
		}
	}

	return new PatientGraphicAssessmentFindingQuestionAnswerVo();
}
 
Example 16
Project: openmaxims-linux   File: UserAssessmentInstHelper.java   Source Code and License 6 votes vote down vote up
private PatientGraphicAssessmentFindingQuestionAnswerVo findOrCreateAnswer(PatientGraphicAssessmentFindingQuestionAnswerVoCollection answers, GraphicAssessmentFindingQuestionVo question)
{
	if(answers == null || question == null)
		return new PatientGraphicAssessmentFindingQuestionAnswerVo();
	
	for(int x = 0; x < answers.size(); x++)
	{
		PatientGraphicAssessmentFindingQuestionAnswerVo answer = answers.get(x);
		if(answer != null 
				&& answer.getGraphicFindingQuestionIsNotNull()
				&& answer.getGraphicFindingQuestion().equals(question))
		{
			return answer;
		}
	}
	
	return new PatientGraphicAssessmentFindingQuestionAnswerVo();
}
 
Example 17
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void addQuestionWithStages(QuestionInformationShortVoCollection voColl)
{
	for (int i = 0; i < voColl.size(); i++)
	{
		grdFindingQuestionsWithStageRow questionRow = getFindingQuestionRowByQuestionWithStages(voColl.get(i));
		if (questionRow == null)
		{
			questionRow = form.lyrDetails().tabFindingsWithStages().grdFindingQuestionsWithStage().getRows().newRow();
		}
		else
		{
			// Duplicate question
			continue;
		}
		GraphicAssessmentFindingQuestionVo voGAFQ = new GraphicAssessmentFindingQuestionVo();
		voGAFQ.setQuestion(domain.getQuestion(voColl.get(i).getID_QuestionInformation()));
		voGAFQ.setActiveStatus(PreActiveActiveInactiveStatus.ACTIVE);
		voGAFQ.setSequence(new Integer(form.lyrDetails().tabFindings().grdFindingQuestions().getRows().size()-1));
		displayQuestionWithStagesRow(questionRow, voGAFQ);

		FindingStageQuestionsVo findingStageQuestionsVo = (FindingStageQuestionsVo) form.lyrDetails().tabFindingsWithStages().dyngrdFindingWithStage().getValue();
		
		if(findingStageQuestionsVo.getAssociatedQuestions() == null)
		{
			findingStageQuestionsVo.setAssociatedQuestions(new GraphicAssessmentFindingQuestionVoCollection());
		}
		
		findingStageQuestionsVo.getAssociatedQuestions().add(voGAFQ);
	}
}
 
Example 18
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private grdFindingQuestionsRow getFindingQuestionRowByQuestion(QuestionInformationShortVo voQIS)
{
	for (int i = 0; i < form.lyrDetails().tabFindings().grdFindingQuestions().getRows().size(); i++)
	{
		GraphicAssessmentFindingQuestionVo voGAFQ = form.lyrDetails().tabFindings().grdFindingQuestions().getRows().get(i).getValue();
		if (voGAFQ != null && voGAFQ.getQuestionIsNotNull() && voGAFQ.getQuestion().equals(voQIS))
			return form.lyrDetails().tabFindings().grdFindingQuestions().getRows().get(i);
	}
	return null;
}
 
Example 19
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private grdFindingQuestionsWithStageRow getFindingQuestionRowByQuestionWithStages(QuestionInformationShortVo voQIS)
{
	for (int i = 0; i < form.lyrDetails().tabFindingsWithStages().grdFindingQuestionsWithStage().getRows().size(); i++)
	{
		GraphicAssessmentFindingQuestionVo voGAFQ = form.lyrDetails().tabFindingsWithStages().grdFindingQuestionsWithStage().getRows().get(i).getValue();
		if (voGAFQ != null && voGAFQ.getQuestionIsNotNull() && voGAFQ.getQuestion().equals(voQIS))
			return form.lyrDetails().tabFindingsWithStages().grdFindingQuestionsWithStage().getRows().get(i);
	}
	return null;
}
 
Example 20
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void displayQuestionRow(grdFindingQuestionsRow row, GraphicAssessmentFindingQuestionVo voGAFQ)
{
	if (row != null && voGAFQ != null)
	{
		QuestionInformationShortVo voQInfoShort = voGAFQ.getQuestion();
		if (voQInfoShort != null)
		{
			row.setcolFindingQuestions(voQInfoShort.getShortText());
			row.setcolStatus(voGAFQ.getActiveStatus());
			row.setcolMandatory(voGAFQ.getIsMandatoryIsNotNull() ? voGAFQ.getIsMandatory().booleanValue() : false);
			row.setcolAllowMultipleAnswers(voGAFQ.getAllowsMultipleAnswersIsNotNull()?voGAFQ.getAllowsMultipleAnswers().booleanValue() : false);
			row.setValue(voGAFQ);
		}
	}
}
 
Example 21
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void displayQuestionWithStagesRow(grdFindingQuestionsWithStageRow row, GraphicAssessmentFindingQuestionVo voGAFQ)
{
	if (row != null && voGAFQ != null)
	{
		QuestionInformationShortVo voQInfoShort = voGAFQ.getQuestion();
		if (voQInfoShort != null)
		{
			row.setcolFindingQuestions(voQInfoShort.getShortText());
			row.setcolStatus(voGAFQ.getActiveStatus());
			row.setcolMandatory(voGAFQ.getIsMandatoryIsNotNull() ? voGAFQ.getIsMandatory().booleanValue() : false);
			row.setcolAllowMultipleAnswers(voGAFQ.getAllowsMultipleAnswersIsNotNull()?voGAFQ.getAllowsMultipleAnswers().booleanValue() : false);
			row.setValue(voGAFQ);
		}
	}
}
 
Example 22
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void updateQuestionVoIntoFindingVo(grdFindingQuestionsRow row)
{
	GraphicAssessmentFindingQuestionVo voGAFQuestion = row.getValue();
	if (voGAFQuestion != null)
	{
		voGAFQuestion.setIsMandatory(new Boolean(row.getcolMandatory()));
		voGAFQuestion.setActiveStatus(row.getcolStatus());
		voGAFQuestion.setAllowsMultipleAnswers(new Boolean(row.getcolAllowMultipleAnswers()));
	}
	row.setValue(voGAFQuestion);

	DynamicGridRow dynamicRow = form.lyrDetails().tabFindings().dyngrdAssessmentFindings().getSelectedRow();
	if (dynamicRow != null)
	{
		Object objValue = dynamicRow.getValue();
		if (objValue != null && objValue instanceof GraphicAssessmentFindingVo)
		{
			GraphicAssessmentFindingVo voGAFinding = (GraphicAssessmentFindingVo) objValue;
			if (voGAFinding.getFindingStage().size() > 0 && voGAFinding.getFindingStage().get(0).getAssociatedQuestionsIsNotNull())
			{
				int questionIndex = voGAFinding.getFindingStage().get(0).getAssociatedQuestions().indexOf(voGAFQuestion);
				if (questionIndex >= 0)
					voGAFinding.getFindingStage().get(0).getAssociatedQuestions().set(questionIndex, voGAFQuestion);
				else
					voGAFinding.getFindingStage().get(0).getAssociatedQuestions().add(voGAFQuestion);
			}
			else
			{
				voGAFinding.getFindingStage().get(0).setAssociatedQuestions(new GraphicAssessmentFindingQuestionVoCollection());
				voGAFinding.getFindingStage().get(0).getAssociatedQuestions().add(voGAFQuestion);
			}
			dynamicRow.setValue(voGAFinding);
		}
	}
}
 
Example 23
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void updateRowObject(grdFindingQuestionsWithStageRow row)
{
	if(row == null)
		return;
	
	GraphicAssessmentFindingQuestionVo val = row.getValue();
	
	if(val != null)
	{
		val.setIsMandatory(new Boolean(row.getcolMandatory()));
		val.setAllowsMultipleAnswers(new Boolean(row.getcolAllowMultipleAnswers()));
		val.setActiveStatus(row.getcolStatus());
	}
}
 
Example 24
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean allowMultipleAnswers(GraphicAssessmentFindingQuestionVo graphicFindingQuestion)
{
	if (graphicFindingQuestion != null)
	{
		return graphicFindingQuestion.getAllowsMultipleAnswersIsNotNull() && graphicFindingQuestion.getAllowsMultipleAnswers().booleanValue();
	}
	return false;
}
 
Example 25
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void checkDataIntegrity(GraphicAssessmentFindingQuestionVo voGraphicAssessmentFinding) throws PresentationLogicException
{
	if (voGraphicAssessmentFinding == null)
		throw new PresentationLogicException("Invalid graphic assessment finding question data");

	if (voGraphicAssessmentFinding.getQuestion() == null)
		throw new PresentationLogicException("Invalid graphic assessment finding question");
}
 
Example 26
Project: AvoinApotti   File: UserAssessmentInstHelper.java   Source Code and License 5 votes vote down vote up
private boolean allowMultipleAnswers(GraphicAssessmentFindingQuestionVo graphicFindingQuestion)
{
	if(graphicFindingQuestion != null)
	{
		return graphicFindingQuestion.getAllowsMultipleAnswersIsNotNull() && graphicFindingQuestion.getAllowsMultipleAnswers().booleanValue();
	}
	return false;
}
 
Example 27
Project: AvoinApotti   File: UserAssessmentInstHelper.java   Source Code and License 5 votes vote down vote up
private void checkDataIntegrity(GraphicAssessmentFindingQuestionVo voGraphicAssessmentFinding) throws PresentationLogicException
{
	if(voGraphicAssessmentFinding == null)
		throw new PresentationLogicException("Invalid graphic assessment finding question data");
	
	if(voGraphicAssessmentFinding.getQuestion() == null)
		throw new PresentationLogicException("Invalid graphic assessment finding question");
}
 
Example 28
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void addQuestionWithStages(QuestionInformationShortVoCollection voColl)
{
	for (int i = 0; i < voColl.size(); i++)
	{
		grdFindingQuestionsWithStageRow questionRow = getFindingQuestionRowByQuestionWithStages(voColl.get(i));
		if (questionRow == null)
		{
			questionRow = form.lyrDetails().tabFindingsWithStages().grdFindingQuestionsWithStage().getRows().newRow();
		}
		else
		{
			// Duplicate question
			continue;
		}
		GraphicAssessmentFindingQuestionVo voGAFQ = new GraphicAssessmentFindingQuestionVo();
		voGAFQ.setQuestion(domain.getQuestion(voColl.get(i).getID_QuestionInformation()));
		voGAFQ.setActiveStatus(PreActiveActiveInactiveStatus.ACTIVE);
		voGAFQ.setSequence(new Integer(form.lyrDetails().tabFindings().grdFindingQuestions().getRows().size()-1));
		displayQuestionWithStagesRow(questionRow, voGAFQ);

		FindingStageQuestionsVo findingStageQuestionsVo = (FindingStageQuestionsVo) form.lyrDetails().tabFindingsWithStages().dyngrdFindingWithStage().getValue();
		
		if(findingStageQuestionsVo.getAssociatedQuestions() == null)
		{
			findingStageQuestionsVo.setAssociatedQuestions(new GraphicAssessmentFindingQuestionVoCollection());
		}
		
		findingStageQuestionsVo.getAssociatedQuestions().add(voGAFQ);
	}
}
 
Example 29
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private grdFindingQuestionsRow getFindingQuestionRowByQuestion(QuestionInformationShortVo voQIS)
{
	for (int i = 0; i < form.lyrDetails().tabFindings().grdFindingQuestions().getRows().size(); i++)
	{
		GraphicAssessmentFindingQuestionVo voGAFQ = form.lyrDetails().tabFindings().grdFindingQuestions().getRows().get(i).getValue();
		if (voGAFQ != null && voGAFQ.getQuestionIsNotNull() && voGAFQ.getQuestion().equals(voQIS))
			return form.lyrDetails().tabFindings().grdFindingQuestions().getRows().get(i);
	}
	return null;
}
 
Example 30
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private grdFindingQuestionsWithStageRow getFindingQuestionRowByQuestionWithStages(QuestionInformationShortVo voQIS)
{
	for (int i = 0; i < form.lyrDetails().tabFindingsWithStages().grdFindingQuestionsWithStage().getRows().size(); i++)
	{
		GraphicAssessmentFindingQuestionVo voGAFQ = form.lyrDetails().tabFindingsWithStages().grdFindingQuestionsWithStage().getRows().get(i).getValue();
		if (voGAFQ != null && voGAFQ.getQuestionIsNotNull() && voGAFQ.getQuestion().equals(voQIS))
			return form.lyrDetails().tabFindingsWithStages().grdFindingQuestionsWithStage().getRows().get(i);
	}
	return null;
}
 
Example 31
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void displayQuestionRow(grdFindingQuestionsRow row, GraphicAssessmentFindingQuestionVo voGAFQ)
{
	if (row != null && voGAFQ != null)
	{
		QuestionInformationShortVo voQInfoShort = voGAFQ.getQuestion();
		if (voQInfoShort != null)
		{
			row.setcolFindingQuestions(voQInfoShort.getShortText());
			row.setcolStatus(voGAFQ.getActiveStatus());
			row.setcolMandatory(voGAFQ.getIsMandatoryIsNotNull() ? voGAFQ.getIsMandatory().booleanValue() : false);
			row.setcolAllowMultipleAnswers(voGAFQ.getAllowsMultipleAnswersIsNotNull()?voGAFQ.getAllowsMultipleAnswers().booleanValue() : false);
			row.setValue(voGAFQ);
		}
	}
}
 
Example 32
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void displayQuestionWithStagesRow(grdFindingQuestionsWithStageRow row, GraphicAssessmentFindingQuestionVo voGAFQ)
{
	if (row != null && voGAFQ != null)
	{
		QuestionInformationShortVo voQInfoShort = voGAFQ.getQuestion();
		if (voQInfoShort != null)
		{
			row.setcolFindingQuestions(voQInfoShort.getShortText());
			row.setcolStatus(voGAFQ.getActiveStatus());
			row.setcolMandatory(voGAFQ.getIsMandatoryIsNotNull() ? voGAFQ.getIsMandatory().booleanValue() : false);
			row.setcolAllowMultipleAnswers(voGAFQ.getAllowsMultipleAnswersIsNotNull()?voGAFQ.getAllowsMultipleAnswers().booleanValue() : false);
			row.setValue(voGAFQ);
		}
	}
}
 
Example 33
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void updateQuestionVoIntoFindingVo(grdFindingQuestionsRow row)
{
	GraphicAssessmentFindingQuestionVo voGAFQuestion = row.getValue();
	if (voGAFQuestion != null)
	{
		voGAFQuestion.setIsMandatory(new Boolean(row.getcolMandatory()));
		voGAFQuestion.setActiveStatus(row.getcolStatus());
		voGAFQuestion.setAllowsMultipleAnswers(new Boolean(row.getcolAllowMultipleAnswers()));
	}
	row.setValue(voGAFQuestion);

	DynamicGridRow dynamicRow = form.lyrDetails().tabFindings().dyngrdAssessmentFindings().getSelectedRow();
	if (dynamicRow != null)
	{
		Object objValue = dynamicRow.getValue();
		if (objValue != null && objValue instanceof GraphicAssessmentFindingVo)
		{
			GraphicAssessmentFindingVo voGAFinding = (GraphicAssessmentFindingVo) objValue;
			if (voGAFinding.getFindingStage().size() > 0 && voGAFinding.getFindingStage().get(0).getAssociatedQuestionsIsNotNull())
			{
				int questionIndex = voGAFinding.getFindingStage().get(0).getAssociatedQuestions().indexOf(voGAFQuestion);
				if (questionIndex >= 0)
					voGAFinding.getFindingStage().get(0).getAssociatedQuestions().set(questionIndex, voGAFQuestion);
				else
					voGAFinding.getFindingStage().get(0).getAssociatedQuestions().add(voGAFQuestion);
			}
			else
			{
				voGAFinding.getFindingStage().get(0).setAssociatedQuestions(new GraphicAssessmentFindingQuestionVoCollection());
				voGAFinding.getFindingStage().get(0).getAssociatedQuestions().add(voGAFQuestion);
			}
			dynamicRow.setValue(voGAFinding);
		}
	}
}
 
Example 34
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void updateRowObject(grdFindingQuestionsWithStageRow row)
{
	if(row == null)
		return;
	
	GraphicAssessmentFindingQuestionVo val = row.getValue();
	
	if(val != null)
	{
		val.setIsMandatory(new Boolean(row.getcolMandatory()));
		val.setAllowsMultipleAnswers(new Boolean(row.getcolAllowMultipleAnswers()));
		val.setActiveStatus(row.getcolStatus());
	}
}
 
Example 35
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean allowMultipleAnswers(GraphicAssessmentFindingQuestionVo graphicFindingQuestion)
{
	if (graphicFindingQuestion != null)
	{
		return graphicFindingQuestion.getAllowsMultipleAnswersIsNotNull() && graphicFindingQuestion.getAllowsMultipleAnswers().booleanValue();
	}
	return false;
}
 
Example 36
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void checkDataIntegrity(GraphicAssessmentFindingQuestionVo voGraphicAssessmentFinding) throws PresentationLogicException
{
	if (voGraphicAssessmentFinding == null)
		throw new PresentationLogicException("Invalid graphic assessment finding question data");

	if (voGraphicAssessmentFinding.getQuestion() == null)
		throw new PresentationLogicException("Invalid graphic assessment finding question");
}
 
Example 37
Project: openMAXIMS   File: UserAssessmentInstHelper.java   Source Code and License 5 votes vote down vote up
private boolean allowMultipleAnswers(GraphicAssessmentFindingQuestionVo graphicFindingQuestion)
{
	if(graphicFindingQuestion != null)
	{
		return graphicFindingQuestion.getAllowsMultipleAnswersIsNotNull() && graphicFindingQuestion.getAllowsMultipleAnswers().booleanValue();
	}
	return false;
}
 
Example 38
Project: openMAXIMS   File: UserAssessmentInstHelper.java   Source Code and License 5 votes vote down vote up
private void checkDataIntegrity(GraphicAssessmentFindingQuestionVo voGraphicAssessmentFinding) throws PresentationLogicException
{
	if(voGraphicAssessmentFinding == null)
		throw new PresentationLogicException("Invalid graphic assessment finding question data");
	
	if(voGraphicAssessmentFinding.getQuestion() == null)
		throw new PresentationLogicException("Invalid graphic assessment finding question");
}
 
Example 39
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void addQuestionWithStages(QuestionInformationShortVoCollection voColl)
{
	for (int i = 0; i < voColl.size(); i++)
	{
		grdFindingQuestionsWithStageRow questionRow = getFindingQuestionRowByQuestionWithStages(voColl.get(i));
		if (questionRow == null)
		{
			questionRow = form.lyrDetails().tabFindingsWithStages().grdFindingQuestionsWithStage().getRows().newRow();
		}
		else
		{
			// Duplicate question
			continue;
		}
		GraphicAssessmentFindingQuestionVo voGAFQ = new GraphicAssessmentFindingQuestionVo();
		voGAFQ.setQuestion(domain.getQuestion(voColl.get(i).getID_QuestionInformation()));
		voGAFQ.setActiveStatus(PreActiveActiveInactiveStatus.ACTIVE);
		voGAFQ.setSequence(new Integer(form.lyrDetails().tabFindings().grdFindingQuestions().getRows().size()-1));
		displayQuestionWithStagesRow(questionRow, voGAFQ);

		FindingStageQuestionsVo findingStageQuestionsVo = (FindingStageQuestionsVo) form.lyrDetails().tabFindingsWithStages().dyngrdFindingWithStage().getValue();
		
		if(findingStageQuestionsVo.getAssociatedQuestions() == null)
		{
			findingStageQuestionsVo.setAssociatedQuestions(new GraphicAssessmentFindingQuestionVoCollection());
		}
		
		findingStageQuestionsVo.getAssociatedQuestions().add(voGAFQ);
	}
}
 
Example 40
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private grdFindingQuestionsRow getFindingQuestionRowByQuestion(QuestionInformationShortVo voQIS)
{
	for (int i = 0; i < form.lyrDetails().tabFindings().grdFindingQuestions().getRows().size(); i++)
	{
		GraphicAssessmentFindingQuestionVo voGAFQ = form.lyrDetails().tabFindings().grdFindingQuestions().getRows().get(i).getValue();
		if (voGAFQ != null && voGAFQ.getQuestionIsNotNull() && voGAFQ.getQuestion().equals(voQIS))
			return form.lyrDetails().tabFindings().grdFindingQuestions().getRows().get(i);
	}
	return null;
}
 
Example 41
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private grdFindingQuestionsWithStageRow getFindingQuestionRowByQuestionWithStages(QuestionInformationShortVo voQIS)
{
	for (int i = 0; i < form.lyrDetails().tabFindingsWithStages().grdFindingQuestionsWithStage().getRows().size(); i++)
	{
		GraphicAssessmentFindingQuestionVo voGAFQ = form.lyrDetails().tabFindingsWithStages().grdFindingQuestionsWithStage().getRows().get(i).getValue();
		if (voGAFQ != null && voGAFQ.getQuestionIsNotNull() && voGAFQ.getQuestion().equals(voQIS))
			return form.lyrDetails().tabFindingsWithStages().grdFindingQuestionsWithStage().getRows().get(i);
	}
	return null;
}
 
Example 42
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void displayQuestionRow(grdFindingQuestionsRow row, GraphicAssessmentFindingQuestionVo voGAFQ)
{
	if (row != null && voGAFQ != null)
	{
		QuestionInformationShortVo voQInfoShort = voGAFQ.getQuestion();
		if (voQInfoShort != null)
		{
			row.setcolFindingQuestions(voQInfoShort.getShortText());
			row.setcolStatus(voGAFQ.getActiveStatus());
			row.setcolMandatory(voGAFQ.getIsMandatoryIsNotNull() ? voGAFQ.getIsMandatory().booleanValue() : false);
			row.setcolAllowMultipleAnswers(voGAFQ.getAllowsMultipleAnswersIsNotNull()?voGAFQ.getAllowsMultipleAnswers().booleanValue() : false);
			row.setValue(voGAFQ);
		}
	}
}
 
Example 43
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void displayQuestionWithStagesRow(grdFindingQuestionsWithStageRow row, GraphicAssessmentFindingQuestionVo voGAFQ)
{
	if (row != null && voGAFQ != null)
	{
		QuestionInformationShortVo voQInfoShort = voGAFQ.getQuestion();
		if (voQInfoShort != null)
		{
			row.setcolFindingQuestions(voQInfoShort.getShortText());
			row.setcolStatus(voGAFQ.getActiveStatus());
			row.setcolMandatory(voGAFQ.getIsMandatoryIsNotNull() ? voGAFQ.getIsMandatory().booleanValue() : false);
			row.setcolAllowMultipleAnswers(voGAFQ.getAllowsMultipleAnswersIsNotNull()?voGAFQ.getAllowsMultipleAnswers().booleanValue() : false);
			row.setValue(voGAFQ);
		}
	}
}
 
Example 44
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void updateQuestionVoIntoFindingVo(grdFindingQuestionsRow row)
{
	GraphicAssessmentFindingQuestionVo voGAFQuestion = row.getValue();
	if (voGAFQuestion != null)
	{
		voGAFQuestion.setIsMandatory(new Boolean(row.getcolMandatory()));
		voGAFQuestion.setActiveStatus(row.getcolStatus());
		voGAFQuestion.setAllowsMultipleAnswers(new Boolean(row.getcolAllowMultipleAnswers()));
	}
	row.setValue(voGAFQuestion);

	DynamicGridRow dynamicRow = form.lyrDetails().tabFindings().dyngrdAssessmentFindings().getSelectedRow();
	if (dynamicRow != null)
	{
		Object objValue = dynamicRow.getValue();
		if (objValue != null && objValue instanceof GraphicAssessmentFindingVo)
		{
			GraphicAssessmentFindingVo voGAFinding = (GraphicAssessmentFindingVo) objValue;
			if (voGAFinding.getFindingStage().size() > 0 && voGAFinding.getFindingStage().get(0).getAssociatedQuestionsIsNotNull())
			{
				int questionIndex = voGAFinding.getFindingStage().get(0).getAssociatedQuestions().indexOf(voGAFQuestion);
				if (questionIndex >= 0)
					voGAFinding.getFindingStage().get(0).getAssociatedQuestions().set(questionIndex, voGAFQuestion);
				else
					voGAFinding.getFindingStage().get(0).getAssociatedQuestions().add(voGAFQuestion);
			}
			else
			{
				voGAFinding.getFindingStage().get(0).setAssociatedQuestions(new GraphicAssessmentFindingQuestionVoCollection());
				voGAFinding.getFindingStage().get(0).getAssociatedQuestions().add(voGAFQuestion);
			}
			dynamicRow.setValue(voGAFinding);
		}
	}
}
 
Example 45
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void updateRowObject(grdFindingQuestionsWithStageRow row)
{
	if(row == null)
		return;
	
	GraphicAssessmentFindingQuestionVo val = row.getValue();
	
	if(val != null)
	{
		val.setIsMandatory(new Boolean(row.getcolMandatory()));
		val.setAllowsMultipleAnswers(new Boolean(row.getcolAllowMultipleAnswers()));
		val.setActiveStatus(row.getcolStatus());
	}
}
 
Example 46
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean allowMultipleAnswers(GraphicAssessmentFindingQuestionVo graphicFindingQuestion)
{
	if (graphicFindingQuestion != null)
	{
		return graphicFindingQuestion.getAllowsMultipleAnswersIsNotNull() && graphicFindingQuestion.getAllowsMultipleAnswers().booleanValue();
	}
	return false;
}
 
Example 47
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void checkDataIntegrity(GraphicAssessmentFindingQuestionVo voGraphicAssessmentFinding) throws PresentationLogicException
{
	if (voGraphicAssessmentFinding == null)
		throw new PresentationLogicException("Invalid graphic assessment finding question data");

	if (voGraphicAssessmentFinding.getQuestion() == null)
		throw new PresentationLogicException("Invalid graphic assessment finding question");
}
 
Example 48
Project: openMAXIMS   File: UserAssessmentInstHelper.java   Source Code and License 5 votes vote down vote up
private boolean allowMultipleAnswers(GraphicAssessmentFindingQuestionVo graphicFindingQuestion)
{
	if(graphicFindingQuestion != null)
	{
		return graphicFindingQuestion.getAllowsMultipleAnswersIsNotNull() && graphicFindingQuestion.getAllowsMultipleAnswers().booleanValue();
	}
	return false;
}
 
Example 49
Project: openMAXIMS   File: UserAssessmentInstHelper.java   Source Code and License 5 votes vote down vote up
private void checkDataIntegrity(GraphicAssessmentFindingQuestionVo voGraphicAssessmentFinding) throws PresentationLogicException
{
	if(voGraphicAssessmentFinding == null)
		throw new PresentationLogicException("Invalid graphic assessment finding question data");
	
	if(voGraphicAssessmentFinding.getQuestion() == null)
		throw new PresentationLogicException("Invalid graphic assessment finding question");
}
 
Example 50
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void addQuestionWithStages(QuestionInformationShortVoCollection voColl)
{
	for (int i = 0; i < voColl.size(); i++)
	{
		grdFindingQuestionsWithStageRow questionRow = getFindingQuestionRowByQuestionWithStages(voColl.get(i));
		if (questionRow == null)
		{
			questionRow = form.lyrDetails().tabFindingsWithStages().grdFindingQuestionsWithStage().getRows().newRow();
		}
		else
		{
			// Duplicate question
			continue;
		}
		GraphicAssessmentFindingQuestionVo voGAFQ = new GraphicAssessmentFindingQuestionVo();
		voGAFQ.setQuestion(domain.getQuestion(voColl.get(i).getID_QuestionInformation()));
		voGAFQ.setActiveStatus(PreActiveActiveInactiveStatus.ACTIVE);
		voGAFQ.setSequence(new Integer(form.lyrDetails().tabFindings().grdFindingQuestions().getRows().size()-1));
		displayQuestionWithStagesRow(questionRow, voGAFQ);

		FindingStageQuestionsVo findingStageQuestionsVo = (FindingStageQuestionsVo) form.lyrDetails().tabFindingsWithStages().dyngrdFindingWithStage().getValue();
		
		if(findingStageQuestionsVo.getAssociatedQuestions() == null)
		{
			findingStageQuestionsVo.setAssociatedQuestions(new GraphicAssessmentFindingQuestionVoCollection());
		}
		
		findingStageQuestionsVo.getAssociatedQuestions().add(voGAFQ);
	}
}
 
Example 51
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private grdFindingQuestionsRow getFindingQuestionRowByQuestion(QuestionInformationShortVo voQIS)
{
	for (int i = 0; i < form.lyrDetails().tabFindings().grdFindingQuestions().getRows().size(); i++)
	{
		GraphicAssessmentFindingQuestionVo voGAFQ = form.lyrDetails().tabFindings().grdFindingQuestions().getRows().get(i).getValue();
		if (voGAFQ != null && voGAFQ.getQuestionIsNotNull() && voGAFQ.getQuestion().equals(voQIS))
			return form.lyrDetails().tabFindings().grdFindingQuestions().getRows().get(i);
	}
	return null;
}
 
Example 52
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private grdFindingQuestionsWithStageRow getFindingQuestionRowByQuestionWithStages(QuestionInformationShortVo voQIS)
{
	for (int i = 0; i < form.lyrDetails().tabFindingsWithStages().grdFindingQuestionsWithStage().getRows().size(); i++)
	{
		GraphicAssessmentFindingQuestionVo voGAFQ = form.lyrDetails().tabFindingsWithStages().grdFindingQuestionsWithStage().getRows().get(i).getValue();
		if (voGAFQ != null && voGAFQ.getQuestionIsNotNull() && voGAFQ.getQuestion().equals(voQIS))
			return form.lyrDetails().tabFindingsWithStages().grdFindingQuestionsWithStage().getRows().get(i);
	}
	return null;
}
 
Example 53
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void displayQuestionRow(grdFindingQuestionsRow row, GraphicAssessmentFindingQuestionVo voGAFQ)
{
	if (row != null && voGAFQ != null)
	{
		QuestionInformationShortVo voQInfoShort = voGAFQ.getQuestion();
		if (voQInfoShort != null)
		{
			row.setcolFindingQuestions(voQInfoShort.getShortText());
			row.setcolStatus(voGAFQ.getActiveStatus());
			row.setcolMandatory(voGAFQ.getIsMandatoryIsNotNull() ? voGAFQ.getIsMandatory().booleanValue() : false);
			row.setcolAllowMultipleAnswers(voGAFQ.getAllowsMultipleAnswersIsNotNull()?voGAFQ.getAllowsMultipleAnswers().booleanValue() : false);
			row.setValue(voGAFQ);
		}
	}
}
 
Example 54
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void displayQuestionWithStagesRow(grdFindingQuestionsWithStageRow row, GraphicAssessmentFindingQuestionVo voGAFQ)
{
	if (row != null && voGAFQ != null)
	{
		QuestionInformationShortVo voQInfoShort = voGAFQ.getQuestion();
		if (voQInfoShort != null)
		{
			row.setcolFindingQuestions(voQInfoShort.getShortText());
			row.setcolStatus(voGAFQ.getActiveStatus());
			row.setcolMandatory(voGAFQ.getIsMandatoryIsNotNull() ? voGAFQ.getIsMandatory().booleanValue() : false);
			row.setcolAllowMultipleAnswers(voGAFQ.getAllowsMultipleAnswersIsNotNull()?voGAFQ.getAllowsMultipleAnswers().booleanValue() : false);
			row.setValue(voGAFQ);
		}
	}
}
 
Example 55
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void updateQuestionVoIntoFindingVo(grdFindingQuestionsRow row)
{
	GraphicAssessmentFindingQuestionVo voGAFQuestion = row.getValue();
	if (voGAFQuestion != null)
	{
		voGAFQuestion.setIsMandatory(new Boolean(row.getcolMandatory()));
		voGAFQuestion.setActiveStatus(row.getcolStatus());
		voGAFQuestion.setAllowsMultipleAnswers(new Boolean(row.getcolAllowMultipleAnswers()));
	}
	row.setValue(voGAFQuestion);

	DynamicGridRow dynamicRow = form.lyrDetails().tabFindings().dyngrdAssessmentFindings().getSelectedRow();
	if (dynamicRow != null)
	{
		Object objValue = dynamicRow.getValue();
		if (objValue != null && objValue instanceof GraphicAssessmentFindingVo)
		{
			GraphicAssessmentFindingVo voGAFinding = (GraphicAssessmentFindingVo) objValue;
			if (voGAFinding.getFindingStage().size() > 0 && voGAFinding.getFindingStage().get(0).getAssociatedQuestionsIsNotNull())
			{
				int questionIndex = voGAFinding.getFindingStage().get(0).getAssociatedQuestions().indexOf(voGAFQuestion);
				if (questionIndex >= 0)
					voGAFinding.getFindingStage().get(0).getAssociatedQuestions().set(questionIndex, voGAFQuestion);
				else
					voGAFinding.getFindingStage().get(0).getAssociatedQuestions().add(voGAFQuestion);
			}
			else
			{
				voGAFinding.getFindingStage().get(0).setAssociatedQuestions(new GraphicAssessmentFindingQuestionVoCollection());
				voGAFinding.getFindingStage().get(0).getAssociatedQuestions().add(voGAFQuestion);
			}
			dynamicRow.setValue(voGAFinding);
		}
	}
}
 
Example 56
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void updateRowObject(grdFindingQuestionsWithStageRow row)
{
	if(row == null)
		return;
	
	GraphicAssessmentFindingQuestionVo val = row.getValue();
	
	if(val != null)
	{
		val.setIsMandatory(new Boolean(row.getcolMandatory()));
		val.setAllowsMultipleAnswers(new Boolean(row.getcolAllowMultipleAnswers()));
		val.setActiveStatus(row.getcolStatus());
	}
}
 
Example 57
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean allowMultipleAnswers(GraphicAssessmentFindingQuestionVo graphicFindingQuestion)
{
	if (graphicFindingQuestion != null)
	{
		return graphicFindingQuestion.getAllowsMultipleAnswersIsNotNull() && graphicFindingQuestion.getAllowsMultipleAnswers().booleanValue();
	}
	return false;
}
 
Example 58
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void checkDataIntegrity(GraphicAssessmentFindingQuestionVo voGraphicAssessmentFinding) throws PresentationLogicException
{
	if (voGraphicAssessmentFinding == null)
		throw new PresentationLogicException("Invalid graphic assessment finding question data");

	if (voGraphicAssessmentFinding.getQuestion() == null)
		throw new PresentationLogicException("Invalid graphic assessment finding question");
}
 
Example 59
Project: openmaxims-linux   File: UserAssessmentInstHelper.java   Source Code and License 5 votes vote down vote up
private boolean allowMultipleAnswers(GraphicAssessmentFindingQuestionVo graphicFindingQuestion)
{
	if(graphicFindingQuestion != null)
	{
		return graphicFindingQuestion.getAllowsMultipleAnswersIsNotNull() && graphicFindingQuestion.getAllowsMultipleAnswers().booleanValue();
	}
	return false;
}
 
Example 60
Project: openmaxims-linux   File: UserAssessmentInstHelper.java   Source Code and License 5 votes vote down vote up
private void checkDataIntegrity(GraphicAssessmentFindingQuestionVo voGraphicAssessmentFinding) throws PresentationLogicException
{
	if(voGraphicAssessmentFinding == null)
		throw new PresentationLogicException("Invalid graphic assessment finding question data");
	
	if(voGraphicAssessmentFinding.getQuestion() == null)
		throw new PresentationLogicException("Invalid graphic assessment finding question");
}