/**
* @see org.andromda.cartridges.bpm4struts.metafacades.StrutsParameter#getResetValue()
*/
protected String handleGetResetValue()
{
final ClassifierFacade type = getType();
if (type != null)
{
final String name = getName();
if (isValidatorString()) return "\"" + name + "-test" + "\"";
if (isValidatorDate()) return "new java.util.Date()";
if (type.isPrimitive())
{
if (isValidatorInteger()) return "(int)" + name.hashCode();
if (isValidatorBoolean()) return "false";
if (isValidatorLong()) return "(long)" + name.hashCode();
if (isValidatorChar()) return "(char)" + name.hashCode();
if (isValidatorFloat()) return "(float)" + name.hashCode();
if (isValidatorDouble()) return "(double)" + name.hashCode();
if (isValidatorShort()) return "(short)" + name.hashCode();
if (isValidatorByte()) return "(byte)" + name.hashCode();
}
else
{
if (isValidatorInteger()) return "new Integer((int)" + name.hashCode() + ")";
if (isValidatorBoolean()) return "Boolean.FALSE";
if (isValidatorLong()) return "new Long((long)" + name.hashCode() + ")";
if (isValidatorChar()) return "new Character(char)" + name.hashCode() + ")";
if (isValidatorFloat()) return "new Float((float)" + name.hashCode() + ")";
if (isValidatorDouble()) return "new Double((double)" + name.hashCode() + ")";
if (isValidatorShort()) return "new Short((short)" + name.hashCode() + ")";
if (isValidatorByte()) return "new Byte((byte)" + name.hashCode() + ")";
}
if (type.isArrayType()) return constructArray();
if (type.isSetType()) return "new java.util.HashSet(java.util.Arrays.asList(" + constructArray() + "))";
if (type.isCollectionType()) return "java.util.Arrays.asList(" + constructArray() + ")";
// maps and others types will simply not be treated
}
return "null";
}