/**
* @see org.andromda.cartridges.jsf.metafacades.JSFAttribute#getDummyValue()
*/
protected String handleGetDummyValue()
{
final ClassifierFacade type = this.getType();
if (type != null)
{
final String typeName = type.getFullyQualifiedName();
final String name = this.getName();
if ("java.lang.String".equals(typeName))
{
return "\"" + name + "-test" + "\"";
}
if ("java.util.Date".equals(typeName))
{
return "new java.util.Date()";
}
if ("java.sql.Date".equals(typeName))
{
return "new java.sql.Date(new java.util.Date().getTime())";
}
if ("java.sql.Timestamp".equals(typeName))
{
return "new java.sql.Timestamp(new Date().getTime())";
}
if ("java.util.Calendar".equals(typeName))
{
return "java.util.Calendar.getInstance()";
}
if ("int".equals(typeName))
{
return "(int)" + name.hashCode();
}
if ("boolean".equals(typeName))
{
return "false";
}
if ("long".equals(typeName))
{
return "(long)" + name.hashCode();
}
if ("char".equals(typeName))
{
return "(char)" + name.hashCode();
}
if ("float".equals(typeName))
{
return "(float)" + name.hashCode() / hashCode();
}
if ("double".equals(typeName))
{
return "(double)" + name.hashCode() / hashCode();
}
if ("short".equals(typeName))
{
return "(short)" + name.hashCode();
}
if ("byte".equals(typeName))
{
return "(byte)" + name.hashCode();
}
if ("java.lang.Integer".equals(typeName))
{
return "new Integer((int)" + name.hashCode() + ")";
}
if ("java.lang.Boolean".equals(typeName))
{
return "Boolean.FALSE";
}
if ("java.lang.Long".equals(typeName))
{
return "new Long((long)" + name.hashCode() + ")";
}
if ("java.lang.Character".equals(typeName))
{
return "new Character(char)" + name.hashCode() + ")";
}
if ("java.lang.Float".equals(typeName))
{
return "new Float((float)" + name.hashCode() / hashCode() + ")";
}
if ("java.lang.Double".equals(typeName))
{
return "new Double((double)" + name.hashCode() / hashCode() + ")";
}
if ("java.lang.Short".equals(typeName))
{
return "new Short((short)" + name.hashCode() + ")";
}
if ("java.lang.Byte".equals(typeName))
{
return "new Byte((byte)" + name.hashCode() + ")";
}
//if (type.isArrayType()) return constructDummyArray();
if (type.isSetType())
{
return "new java.util.HashSet(java.util.Arrays.asList(" + constructDummyArray() + "))";
}
if (type.isCollectionType())
{
return "java.util.Arrays.asList(" + constructDummyArray() + ")";
}
// maps and others types will simply not be treated