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

The following are Jave code examples for showing how to use PARTIALDATE 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: Logic.java   Source Code and License Vote up 5 votes
private DynamicCellType getSeedSearchCellType(ReportSeedParsedVo seed)
{
	// If the seed is marked as 'search'-able seed
	if (seed.getSearchTypeIsNotNull())
	{
		// If the seed is 'search'-able partial date - search type will be the string "PD"
		if (seed.getSearchType().equalsIgnoreCase("PD"))
			return DynamicCellType.PARTIALDATE;
		
		// If the seed is 'search'-able by a collection of strings - the search type will be the string "S"
		if (seed.getSearchType().equalsIgnoreCase("S"))
		{
			// WDEV-14289'
			// For 'Lookup instance' we use a combo-box 
			if (seed.getBOName().equalsIgnoreCase("ims.domain.lookups.LookupInstance"))
			{
				return DynamicCellType.ENUMERATION;
			}
			
			return DynamicCellType.QUERYCOMBOBOX;
		}
	}

	// Keep this for old reports legacy
	if(seed.getType().equalsIgnoreCase(INTEGER) &&
			(seed.getName().equalsIgnoreCase("DOB") || seed.getName().equalsIgnoreCase("DOB_START") || seed.getName().equalsIgnoreCase("DOB_END")
			|| seed.getName().equalsIgnoreCase("DATE_OF_BIRTH_FROM") || seed.getName().equalsIgnoreCase("DATE_OF_BIRTH_TO") || "PD".equalsIgnoreCase(seed.getSearchType())))
	{
		return DynamicCellType.PARTIALDATE;
	}


	return getReportSeed().getCellType(seed);
}
 
Example 5
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
/**
 * WDEV-12753
 * Function used to determine the type of cell used as a value for seed
 */
private DynamicCellType getSeedSearchCellType(ReportSeedParsedVo seed)
{
	// If the seed is marked as 'search'-able seed
	if (seed.getSearchTypeIsNotNull())
	{
		// If the seed is 'search'-able partial date - search type will be the string "PD"
		if (seed.getSearchType().equalsIgnoreCase("PD"))
			return DynamicCellType.PARTIALDATE;
		
		// If the seed is 'search'-able by a collection of strings - the search type will be the string "S"
		if (seed.getSearchType().equalsIgnoreCase("S"))
		{
			// WDEV-14289'
			// For 'Lookup instance' we use a combo-box 
			if (seed.getBOName().equalsIgnoreCase("ims.domain.lookups.LookupInstance"))
			{
				return DynamicCellType.ENUMERATION;
			}
			
			return DynamicCellType.QUERYCOMBOBOX;
		}
	}

	// Keep this for old reports legacy
	if(seed.getType().equalsIgnoreCase(INTEGER) &&
			(seed.getName().equalsIgnoreCase("DOB") || seed.getName().equalsIgnoreCase("DOB_START") || seed.getName().equalsIgnoreCase("DOB_END")
			|| seed.getName().equalsIgnoreCase("DATE_OF_BIRTH_FROM") || seed.getName().equalsIgnoreCase("DATE_OF_BIRTH_TO") || "PD".equalsIgnoreCase(seed.getSearchType())))
	{
		return DynamicCellType.PARTIALDATE;
	}


	return getReportSeed().getCellType(seed);
}
 
Example 6
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 7
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 8
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 4 votes
private void addSeed(ReportSeedParsedVo voSeed)
{
	if (voSeed == null)
		return;

	DynamicGridRow row = form.dyngrdParameters().getRows().newRow();

	DynamicGridCell nameCell = row.getCells().newCell(getColumn(NAME_COLUMN), DynamicCellType.WRAPTEXT);
	String seedName = getReportSeed().getCellName(voSeed);
	nameCell.setValue(seedName);
	nameCell.setReadOnly(true);

	DynamicCellType cellType = null;
	
	if(voSeed.getType().equalsIgnoreCase(INTEGER) && (voSeed.getName().equalsIgnoreCase("DOB") || voSeed.getName().equalsIgnoreCase("DOB_START") || voSeed.getName().equalsIgnoreCase("DOB_END") || voSeed.getName().equalsIgnoreCase("DATE_OF_BIRTH_FROM") || voSeed.getName().equalsIgnoreCase("DATE_OF_BIRTH_TO")))
	{
		cellType = DynamicCellType.PARTIALDATE;
	}
	else
		cellType = getReportSeed().getCellType(voSeed);
	
	Object value = getReportSeed().getValue(voSeed);

	DynamicGridCell valueCell = row.getCells().newCell(getColumn(VALUE_COLUMN), cellType);
	if (cellType.equals(DynamicCellType.QUERYCOMBOBOX))
	{
		valueCell.getItems().newItem(value);
		valueCell.setAutoPostBack(true);
	}

	if(cellType.equals(DynamicCellType.PARTIALDATE) && value instanceof java.lang.Integer)
	{
		valueCell.setValue(new PartialDate((Integer)value));
	}
	else
	{	
		valueCell.setValue(value);
	}
	
	valueCell.setIdentifier(getReportSeed().getIdentifier(voSeed));

	boolean canBeNull = voSeed == null ? true : voSeed.getCanBeNull().booleanValue();
	valueCell.setCanBeEmpty(canBeNull);
	
	if(canBeNull == false)
	{
		DynamicGridCell mandatoryCell = row.getCells().newCell(getColumn(MANDATORY_COLUMN), DynamicCellType.HTMLVIEW);
		mandatoryCell.setValue("<font color='#FF0000' size='3'>*</font>");
		mandatoryCell.setTooltip("Required");
		
		valueCell.setValidationMessage(seedName + " is mandatory");
	}
	
	row.setValue(voSeed);
}
 
Example 9
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 10
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 11
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());
	}
}