String getMethodName = accessor.getAccessMethods().getGetMethodName();
Method getMethod = MetadataHelper.getMethod(getMethodName, getJavaClass(), new Class[]{});
String setMethodName = accessor.getAccessMethods().getSetMethodName();
Method setMethod = MetadataHelper.getMethod(setMethodName, getJavaClass(), new Class[]{getMethod.getReturnType()});
accessibleObject = new MetadataMethod(getMethod, setMethod, accessor.getName(), getEntityMappings());
} else {
Method method = MetadataHelper.getMethodForPropertyName(accessor.getName(), getJavaClass());
if (method == null) {
throw ValidationException.invalidPropertyForClass(accessor.getName(), getJavaClass());
} else {
MetadataMethod metadataMethod = new MetadataMethod(method, getEntityMappings());
// True will force an exception to be thrown if it
// is not a valid method. However, if it is a
// transient accessor, don't validate it and just
// let it through.
if (accessor.isTransient() || metadataMethod.isValidPersistenceMethod(getDescriptor(), true)) {
accessibleObject = metadataMethod;
}
}
}
} else {