void validateDomainType(final ConfigurationUnits configurationUnits, final ProblemReporter problemReporter) {
final Class<?> domainType = configurationUnits.getDomainType();
if (notPersistentEntityType(domainType)) {
problemReporter.error(new DomainConfigurationProblem(configurationUnits, format("Non-persistent type %s is not supported.", domainType.getSimpleName())));
}
if (!hasConstructor(domainType)) {
problemReporter.error(new DomainConfigurationProblem(configurationUnits, format("Type %s must have default constructor.", domainType.getSimpleName())));
}
}