public Boolean update(String sql, List<Object> objParams,
			List<String> paramTypes, boolean flag) throws DBException {
		Connection conn = null;
		PreparedStatement pstm = null;
		Boolean updateFlag = false;
		try {
			conn = DBUtil.getConnection();
			pstm = flag ? conn.prepareStatement(sql,
					Statement.RETURN_GENERATED_KEYS) : conn
					.prepareStatement(sql);
			if (null == objParams) {

			} else {
				for (int i = 0; i < objParams.size(); i++) {
					SetPreparedStatement.setPreparedStatementByPropertiesType(
							pstm, i + 1, paramTypes.get(i), objParams.get(i));
				}
			}
			// 设置不自动提交
			conn.setAutoCommit(false);
			int result = pstm.executeUpdate();

			conn.commit();
			if (result > 0)
				updateFlag = true;
		} catch (SQLException ex) {
			ex.printStackTrace();

			throw new DBException("数据库更新方法出现错误！！！");

		} finally {
			try {
				pstm.close();
				conn.close();
			} catch (SQLException e) {
				e.printStackTrace();
			}
		}
		return updateFlag;
	}