Java Code Examples for ims.framework.enumerations.DynamicCellType.TIME

The following are Jave code examples for showing how to use TIME of the ims.framework.enumerations.DynamicCellType class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 6 votes
private DynamicCellType getCellAnswerType(ims.core.vo.lookups.QuestionAnswerType answerType)
{
	if (answerType.equals(ims.core.vo.lookups.QuestionAnswerType.DATE))
		return DynamicCellType.DATE;
	else if (answerType.equals(ims.core.vo.lookups.QuestionAnswerType.DECIMAL))
		return DynamicCellType.DECIMAL;
	else if (answerType.equals(ims.core.vo.lookups.QuestionAnswerType.INTEGER))
		return DynamicCellType.INT;
	else if (answerType.equals(ims.core.vo.lookups.QuestionAnswerType.MULTISELECT))
		return DynamicCellType.MULTISELECT;
	else if (answerType.equals(ims.core.vo.lookups.QuestionAnswerType.PARTIALDATE))
		return DynamicCellType.PARTIALDATE;
	else if (answerType.equals(ims.core.vo.lookups.QuestionAnswerType.PICKLIST))
		return DynamicCellType.ENUMERATION;
	else if (answerType.equals(ims.core.vo.lookups.QuestionAnswerType.SEPARATOR))
		return DynamicCellType.DYNAMICLABEL;
	else if (answerType.equals(ims.core.vo.lookups.QuestionAnswerType.TEXT))
		return DynamicCellType.WRAPTEXT;
	else if (answerType.equals(ims.core.vo.lookups.QuestionAnswerType.TIME))
		return DynamicCellType.TIME;
	else if (answerType.equals(ims.core.vo.lookups.QuestionAnswerType.YESNO))
		return DynamicCellType.ANSWER;

	return DynamicCellType.EMPTY;
}
 
Example 2
Project: AvoinApotti   File: UserAssessmentInstHelper.java   Source Code and License Vote up 6 votes
private DynamicCellType getCellAnswerType(ims.core.vo.lookups.QuestionAnswerType answerType)
{
	if(answerType.equals(ims.core.vo.lookups.QuestionAnswerType.DATE))
		return DynamicCellType.DATE;
	else if(answerType.equals(ims.core.vo.lookups.QuestionAnswerType.DECIMAL))
		return DynamicCellType.DECIMAL;
	else if(answerType.equals(ims.core.vo.lookups.QuestionAnswerType.INTEGER))
		return DynamicCellType.INT;
	else if(answerType.equals(ims.core.vo.lookups.QuestionAnswerType.MULTISELECT))
		return DynamicCellType.MULTISELECT;
	else if(answerType.equals(ims.core.vo.lookups.QuestionAnswerType.PARTIALDATE))
		return DynamicCellType.PARTIALDATE;
	else if(answerType.equals(ims.core.vo.lookups.QuestionAnswerType.PICKLIST))
		return DynamicCellType.ENUMERATION;
	else if(answerType.equals(ims.core.vo.lookups.QuestionAnswerType.SEPARATOR))
		return DynamicCellType.DYNAMICLABEL;
	else if(answerType.equals(ims.core.vo.lookups.QuestionAnswerType.TEXT))
		return DynamicCellType.WRAPTEXT;
	else if(answerType.equals(ims.core.vo.lookups.QuestionAnswerType.TIME))
		return DynamicCellType.TIME;
	else if(answerType.equals(ims.core.vo.lookups.QuestionAnswerType.YESNO))
		return DynamicCellType.ANSWER;
	
	return DynamicCellType.EMPTY;		
}
 
Example 3
Project: AvoinApotti   File: MyOrderQuestionsPopulation.java   Source Code and License Vote up 6 votes
private DynamicCellType getCellAnswerType(ims.core.vo.lookups.QuestionAnswerType answerType)
{
	if(answerType.equals(ims.core.vo.lookups.QuestionAnswerType.DATE))
		return DynamicCellType.DATE;
	else if(answerType.equals(ims.core.vo.lookups.QuestionAnswerType.DECIMAL))
		return DynamicCellType.DECIMAL;
	else if(answerType.equals(ims.core.vo.lookups.QuestionAnswerType.INTEGER))
		return DynamicCellType.INT;
	else if(answerType.equals(ims.core.vo.lookups.QuestionAnswerType.MULTISELECT))
		return DynamicCellType.MULTISELECT;
	else if(answerType.equals(ims.core.vo.lookups.QuestionAnswerType.PARTIALDATE))
		return DynamicCellType.PARTIALDATE;
	else if(answerType.equals(ims.core.vo.lookups.QuestionAnswerType.PICKLIST))
		return DynamicCellType.ENUMERATION;
	else if(answerType.equals(ims.core.vo.lookups.QuestionAnswerType.SEPARATOR))
		return DynamicCellType.DYNAMICLABEL;
	else if(answerType.equals(ims.core.vo.lookups.QuestionAnswerType.TEXT))
		return DynamicCellType.WRAPTEXT;
	else if(answerType.equals(ims.core.vo.lookups.QuestionAnswerType.TIME))
		return DynamicCellType.TIME;
	else if(answerType.equals(ims.core.vo.lookups.QuestionAnswerType.YESNO))
		return DynamicCellType.ANSWER;
	
	return DynamicCellType.EMPTY;		
}
 
Example 4
Project: AvoinApotti   File: ReportSeedsHelper.java   Source Code and License Vote up 5 votes
public DynamicCellType getCellType(ReportSeedParsedVo voReportSeed)
{
	if (voReportSeed == null)
		return DynamicCellType.LABEL;

	String dataType = voReportSeed.getType();
	if (dataType == null)
		return DynamicCellType.LABEL;

	if (dataType.equals(INTEGER) || dataType.equals(BIG_INTEGER) || dataType.equals(SHORT) || dataType.equals(LONG))
	{
		DynamicCellType defaultType = DynamicCellType.INT;

		if (dataType.equals(INTEGER))
			defaultType = getBoReportType(voReportSeed);

		return defaultType;
	}

	if (dataType.equals(BOOOLEAN))
		return DynamicCellType.BOOL;

	if (dataType.equals(STRING))
		return DynamicCellType.STRING;

	if (dataType.equals(BIG_DECIMAL) || dataType.equals(FLOAT) || dataType.equals(DOUBLE))
		return DynamicCellType.DECIMAL;

	if (dataType.equals(SQL_DATE))
		return DynamicCellType.DATE;

	if (dataType.equals(UTIL_DATE))
		return DynamicCellType.DATETIME;
	
	if (dataType.equals(SQL_TIME))
		return DynamicCellType.TIME;

	return DynamicCellType.LABEL;
}
 
Example 5
Project: AvoinApotti   File: MyOrderQuestionsPopulation.java   Source Code and License Vote up 5 votes
private void setCellAnswerTooltip(DynamicGridCell cell, AnswerDetailsVo answer)
{
	if(cell == null || answer == null)
		return;
	
	else if(cell.getType() == DynamicCellType.COMMENT)
	{
		cell.setTooltip(answer.getStringAnswer());
	}
	else if(cell.getType() == DynamicCellType.DATE && answer.getDateAnswer() != null)
	{
		cell.setTooltip(answer.getDateAnswer().toString());
	}
	else if(cell.getType() == DynamicCellType.PARTIALDATE && answer.getPartialDate() != null)
	{
		cell.setTooltip(answer.getPartialDate().toString());
	}
	else if(cell.getType() == DynamicCellType.DECIMAL && answer.getDecimalAnswer() != null)
	{
		cell.setTooltip(answer.getDecimalAnswer().toString());
	}
	else if(cell.getType() == DynamicCellType.INT && answer.getIntegerAnswer() != null)
	{
		cell.setTooltip(answer.getIntegerAnswer().toString());
	}
	else if(cell.getType() == DynamicCellType.STRING)
	{
		cell.setTooltip(answer.getStringAnswer());
	}
	else if(cell.getType() == DynamicCellType.TIME && answer.getTimeAnswer() != null)
	{
		cell.setTooltip(answer.getTimeAnswer().toString());
	}
	else if(cell.getType() == DynamicCellType.WRAPTEXT)
	{
		cell.setTooltip(answer.getStringAnswer());
	}
	
}
 
Example 6
Project: AvoinApotti   File: MyOrderQuestionsPopulation.java   Source Code and License Vote up 5 votes
private DynamicCellType getQuestionAnswerType(QuestionAnswerType answerType)
{
	if(answerType == null)
		return DynamicCellType.EMPTY;
	
	if(answerType.equals(ims.core.vo.lookups.QuestionAnswerType.DATE))
		return DynamicCellType.DATE;
	if(answerType.equals(ims.core.vo.lookups.QuestionAnswerType.DECIMAL))
		return DynamicCellType.DECIMAL;
	if(answerType.equals(ims.core.vo.lookups.QuestionAnswerType.INTEGER))
		return DynamicCellType.INT;
	if(answerType.equals(ims.core.vo.lookups.QuestionAnswerType.PICKLIST))
		return DynamicCellType.ENUMERATION;
	if(answerType.equals(ims.core.vo.lookups.QuestionAnswerType.TEXT))
		return DynamicCellType.WRAPTEXT;
	if(answerType.equals(ims.core.vo.lookups.QuestionAnswerType.TIME))
		return DynamicCellType.TIME;
	if(answerType.equals(ims.core.vo.lookups.QuestionAnswerType.YESNO))
		return DynamicCellType.ANSWER;
	if(answerType.equals(ims.core.vo.lookups.QuestionAnswerType.MULTISELECT))
		return DynamicCellType.MULTISELECT;
	if(answerType.equals(ims.core.vo.lookups.QuestionAnswerType.PARTIALDATE))
		return DynamicCellType.PARTIALDATE;		
	if(answerType.equals(ims.core.vo.lookups.QuestionAnswerType.SEPARATOR))
		return DynamicCellType.LABEL;		
	
	return DynamicCellType.EMPTY;
}
 
Example 7
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 4 votes
private void setCellAnswer(DynamicGridCell cell, Answer_DetailsVo answer)
{
	if (cell == null)
		return;
	if (answer == null)
		return;
	Question_AnswerTypeVo answerType = null;
	if (cell.getIdentifier() instanceof Question_AnswerTypeVo)
		answerType = (Question_AnswerTypeVo) cell.getIdentifier();
	else if (cell.getIdentifier() instanceof Answer_CellData)
		answerType = ((Answer_CellData) cell.getIdentifier()).getConfigData();

	cell.setIdentifier(new Answer_CellData(answerType, answer));

	if (cell.getType() == DynamicCellType.ANSWER)
	{
		if (answer.getBoolValueAnswerIsNotNull())
			cell.setValue(answer.getBoolValueAnswer().booleanValue() ? this.optionYes : this.optionNo);
		else
			cell.setValue(null);
	}
	else if (cell.getType() == DynamicCellType.COMMENT)
	{
		cell.setValue(answer.getStringAnswer());
	}
	else if (cell.getType() == DynamicCellType.DATE)
	{
		cell.setValue(answer.getDateAnswer());
	}
	else if (cell.getType() == DynamicCellType.PARTIALDATE)
	{
		cell.setValue(answer.getPartialDate());
	}
	else if (cell.getType() == DynamicCellType.DECIMAL)
	{
		cell.setValue(answer.getDecimalAnswer());
	}
	else if (cell.getType() == DynamicCellType.ENUMERATION)
	{
		cell.setValue(answer.getPicklist());
	}
	else if (cell.getType() == DynamicCellType.INT)
	{
		cell.setValue(answer.getIntegerAnswer());
	}
	else if (cell.getType() == DynamicCellType.STRING)
	{
		cell.setValue(answer.getStringAnswer());
	}
	else if (cell.getType() == DynamicCellType.TIME)
	{
		cell.setValue(answer.getTimeAnswer());
	}
	else if (cell.getType() == DynamicCellType.WRAPTEXT)
	{
		cell.setValue(answer.getStringAnswer());
	}
	else if (cell.getType() == DynamicCellType.MULTISELECT)
	{
		setCellMultiAnswer(cell, answer.getMultiSelectAnswers());
	}
}
 
Example 8
Project: AvoinApotti   File: UserAssessmentInstHelper.java   Source Code and License Vote up 4 votes
private void setCellAnswer(DynamicGridCell cell, Answer_DetailsVo answer)
{
	if (cell == null)
		return;
	if (answer == null)
		return;

	Question_AnswerTypeVo answerType = null;

	if (cell.getIdentifier() instanceof Question_AnswerTypeVo)
		answerType = (Question_AnswerTypeVo) cell.getIdentifier();
	else if (cell.getIdentifier() instanceof AnswerCellData)
		answerType = ((Answer_CellData) cell.getIdentifier()).getConfigData();

	cell.setIdentifier(new Answer_CellData(answerType, answer));
	
	if(cell.getType() == DynamicCellType.ANSWER)
	{
		if(answer.getBoolValueAnswerIsNotNull())
			cell.setValue(answer.getBoolValueAnswer().booleanValue() ? this.optionYes : this.optionNo);
		else
			cell.setValue(null);
	}
	else if(cell.getType() == DynamicCellType.COMMENT)
	{
		cell.setValue(answer.getStringAnswer());
	}
	else if(cell.getType() == DynamicCellType.DATE)
	{
		cell.setValue(answer.getDateAnswer());
	}
	else if(cell.getType() == DynamicCellType.PARTIALDATE)
	{
		cell.setValue(answer.getPartialDate());
	}
	else if(cell.getType() == DynamicCellType.DECIMAL)
	{
		cell.setValue(answer.getDecimalAnswer());
	}
	else if(cell.getType() == DynamicCellType.ENUMERATION)
	{
		cell.setValue(answer.getPicklist());			
	}
	else if(cell.getType() == DynamicCellType.INT)
	{
		cell.setValue(answer.getIntegerAnswer());
	}
	else if(cell.getType() == DynamicCellType.STRING)
	{
		cell.setValue(answer.getStringAnswer());
	}
	else if(cell.getType() == DynamicCellType.TIME)
	{
		cell.setValue(answer.getTimeAnswer());
	}
	else if(cell.getType() == DynamicCellType.WRAPTEXT)
	{
		cell.setValue(answer.getStringAnswer());
	}
	else if(cell.getType() == DynamicCellType.MULTISELECT)
	{			
		setCellMultiAnswer(cell, answer.getMultiSelectAnswers());
	}
}
 
Example 9
Project: AvoinApotti   File: MyOrderQuestionsPopulation.java   Source Code and License Vote up 4 votes
public void setCellAnswer(DynamicGridCell cell, AnswerDetailsVo answer)
{
	if(cell == null)
		return;
	if(answer == null)
		return;
	
	if(cell.getType() == DynamicCellType.ANSWER)
	{
		if(answer.getBoolValueAnswerIsNotNull())
			cell.setValue(answer.getBoolValueAnswer().booleanValue() ? this.optionYes : this.optionNo);
		else
			cell.setValue(null);
	}
	else if(cell.getType() == DynamicCellType.COMMENT)
	{
		cell.setValue(answer.getStringAnswer());
	}
	else if(cell.getType() == DynamicCellType.DATE)
	{
		cell.setValue(answer.getDateAnswer());
	}
	else if(cell.getType() == DynamicCellType.PARTIALDATE)
	{
		cell.setValue(answer.getPartialDate());
	}
	else if(cell.getType() == DynamicCellType.DECIMAL)
	{
		cell.setValue(answer.getDecimalAnswer());
	}
	else if(cell.getType() == DynamicCellType.ENUMERATION)
	{
		cell.setValue(answer.getPicklist());			
	}
	else if(cell.getType() == DynamicCellType.INT)
	{
		cell.setValue(answer.getIntegerAnswer());
	}
	else if(cell.getType() == DynamicCellType.STRING)
	{
		cell.setValue(answer.getStringAnswer());
	}
	else if(cell.getType() == DynamicCellType.TIME)
	{
		cell.setValue(answer.getTimeAnswer());
	}
	else if(cell.getType() == DynamicCellType.WRAPTEXT)
	{
		cell.setValue(answer.getStringAnswer());
	}
	else if(cell.getType() == DynamicCellType.MULTISELECT)
	{			
		setCellMultiAnswer(cell, answer.getMultiSelectAnswers());
	}
}