private PropertyDescriptor getWriteMethod(Field field) throws Exception {
        PropertyDescriptor descriptor = null;
        String fieldName = field.getName();
        try {
            PropertyDescriptor[] descriptors = Introspector.getBeanInfo(clazz).getPropertyDescriptors();
            for (PropertyDescriptor propertyDescriptor : descriptors) {
                if (propertyDescriptor.getWriteMethod() != null
                        && fieldToDescriptor(propertyDescriptor, fieldName)) {
                    descriptor = propertyDescriptor;
                    break;
                }
            }
        } catch (IntrospectionException ex) {
            Logger.getLogger(EntityReadProperties.class.getName()).log(Level.SEVERE, null, ex);
        }
        return descriptor;
    }