private void callSetter(Object target, SimpleProperty property, Object value)
            throws SQLException {

    	
        Class<?>[] params = property.getWriteParameterTypes();
        try {
            // convert types for some popular ones
            if (value != null) {
                if (value instanceof java.util.Date) {
                    if (params[0].getName().equals("java.sql.Date")) {
                        value = new java.sql.Date(((java.util.Date) value).getTime());
                    } else
                    if (params[0].getName().equals("java.sql.Time")) {
                        value = new java.sql.Time(((java.util.Date) value).getTime());
                    } else
                    if (params[0].getName().equals("java.sql.Timestamp")) {
                        value = new java.sql.Timestamp(((java.util.Date) value).getTime());
                    }
                }
            }

            // Don't call setter if the value object isn't the right type 
            if (this.isCompatibleType(value, params[0])) {
                try {
					property.invokeWrite(target,value);
				} catch (InvocationTargetException e) {
					throw new SQLException(e);
				}
            } else {
              throw new SQLException(
                  "Cannot set " + property.getName() + ": incompatible types.");
            }

        } catch (IllegalArgumentException e) {
            throw new SQLException(
                "Cannot set " + property.getName() + ": " + e.getMessage());

        } 
//        catch (IllegalAccessException e) {
//            throw new SQLException(
//                "Cannot set " + methodName + ": " + e.getMessage());
//
//        } catch (InvocationTargetException e) {
//            throw new SQLException(
//                "Cannot set " + methodName + ": " + e.getMessage());
//        }
    }