@Override
	public void update(T t) throws Exception {
		Class<?> clazz = t.getClass();
		//获得表名
		String tableName = getTableName(clazz);
		//获得字段
		List<Object> fieldNames = new ArrayList<Object>();	//字段名
		List<Object> fieldValues = new ArrayList<Object>();	//字段值
		List<String> placeholders = new ArrayList<String>();//占位符
		String idFieldName = "";
		Object idFieldValue = "";
		Field[] fields = clazz.getDeclaredFields();
		for (Field field : fields) {
			PropertyDescriptor pd = new PropertyDescriptor(field.getName(),t.getClass());
			if (field.isAnnotationPresent(Id.class)) {
				idFieldName = field.getAnnotation(Id.class).value();
				idFieldValue = pd.getReadMethod().invoke(t);
			} else if(field.isAnnotationPresent(Column.class)) {
				fieldNames.add(field.getAnnotation(Column.class).value());
				fieldValues.add(pd.getReadMethod().invoke(t));
				placeholders.add("?");
			}
		}
		//ID作为更新条件，放在集合中的最后一个元素
		fieldNames.add(idFieldName);
		fieldValues.add(idFieldValue);
		placeholders.add("?");
		
		//拼接sql
		StringBuilder sql = new StringBuilder("");
		sql.append("update ").append(tableName).append(" set ");
		int index = fieldNames.size() - 1;
		for (int i = 0; i < index; i++) {
			sql.append(fieldNames.get(i)).append("=").append(placeholders.get(i)).append(",");
		}
		sql.deleteCharAt(sql.length()-1).append(" where ").append(fieldNames.get(index)).append("=").append("?");
		
		//设置SQL参数占位符的值
		PreparedStatement ps = JdbcDaoHelper.getConnection().prepareStatement(sql.toString());
		setParameter(fieldValues, ps, false);
		
		//执行SQL
		ps.execute();
		JdbcDaoHelper.release(ps, null);
		
		System.out.println(sql + "\n" + clazz.getSimpleName() + "修改成功.");
	}