.withField("id")
.and().withField("subField1")
;
final Map<String, Object> conv = new HashMap<String, Object>();
conv.put("field1Converter", new ValueConverter() {
public Object convertToDto(final Object object, final BeanFactory beanFactory) {
final MyEntity.Field1 field1 = (MyEntity.Field1) object;
return Boolean.valueOf(field1 == MyEntity.Field1.YES);
}
public Object convertToEntity(final Object object, final Object oldEntity, final BeanFactory beanFactory) {
if ((Boolean) object) {
return MyEntity.Field1.YES;
}
return MyEntity.Field1.NO;
}
});
conv.put("field5VirtualConverter", new ValueConverter() {
public Object convertToDto(final Object object, final BeanFactory beanFactory) {
return String.valueOf(object.hashCode());
}
public Object convertToEntity(final Object object, final Object oldEntity, final BeanFactory beanFactory) {