@Override
public String apply(final Object instance) {
try {
return entityNameExtractor.apply(instance);
} catch (Exception ex) {
BeanWrapper beanWrapper = new DirectFieldAccessFallbackBeanWrapper(instance);
String domainTypeName = domainTypeBasicConfiguration.getDomainTypeName();
Object id = beanWrapper.getPropertyValue(domainTypeBasicConfiguration.getPersistentEntity().getIdProperty().getName());
return format("%s #%s", domainTypeName, String.valueOf(id));
}
}
};