return configurationUnit;
}
private FieldSetConfigurationUnit fieldSetUnitWithPersistentFields(final Class<?> domainType, DomainConfigurationUnitType configurationUnitType) {
final FieldSetConfigurationUnitBuilder fieldSetConfigurationUnitBuilder = new GenericFieldSetConfigurationUnitBuilder(domainType, configurationUnitType);
PersistentEntity persistentEntity = getPersistentEntity(domainType);
persistentEntity.doWithProperties(new SimplePropertyHandler() {
@Override
public void doWithPersistentProperty(PersistentProperty<?> property) {
addField(property, fieldSetConfigurationUnitBuilder);
}
});
persistentEntity.doWithAssociations(new SimpleAssociationHandler() {
@Override
public void doWithAssociation(Association<? extends PersistentProperty<?>> association) {
addField(association.getInverse(), fieldSetConfigurationUnitBuilder);
}
});
return fieldSetConfigurationUnitBuilder.build();
}