throw ValidationException.classNotFoundWhileConvertingClassNames(attributeConverterClassName, exception);
}
// Ensure the mapping has the correct field classification set.
if (mapping.isDirectToFieldMapping()) {
DirectToFieldMapping m = (DirectToFieldMapping) mapping;
m.setConverter(converter);
m.setFieldClassification(fieldClassification);
m.setFieldClassificationClassName(fieldClassificationName);
} else if (mapping.isDirectMapMapping() && isForMapKey) {
DirectMapMapping m = (DirectMapMapping) mapping;
m.setKeyConverter(converter);
m.setDirectKeyFieldClassification(fieldClassification);
m.setDirectKeyFieldClassificationName(fieldClassificationName);
} else if (mapping.isDirectCollectionMapping()) {
DirectCollectionMapping m = (DirectCollectionMapping) mapping;
m.setValueConverter(converter);
m.setDirectFieldClassification(fieldClassification);
m.setDirectFieldClassificationName(fieldClassificationName);
} else {
// TODO: what else could it be???
}
}