private IModelProperty createValueProperty(final Class<?> ptype, final String pname, final Object obj,
final PropertyMetadata pdata) {
IModelProperty prop = null;
if(String.class == ptype) {
prop = new StringPropertyValue(pname, pdata, (String) obj);
}
else if(Date.class == ptype) {
final Date d = obj == null ? null : new Date(((Date) obj).getTime());
prop = new DatePropertyValue(pname, pdata, d);