* the field type of the field in the object or the type returned by the getter method.
*/
private MetadataClass getAttributeTypeFromClass(MetadataClass metadataClass, String attributeName, DatabaseMapping mapping, boolean checkSuperclass){
String getterMethod = mapping.getGetMethodName();
if (mapping != null && getterMethod != null) {
MetadataMethod method = metadataClass.getMethod(getterMethod, new ArrayList(), checkSuperclass);
if (method == null) {
return null;
}
return method.getMetadataFactory().getMetadataClass(method.getReturnType());
} else {
MetadataField field = metadataClass.getField(attributeName, checkSuperclass);
if (field == null) {
return null;
}