public <T> Boolean delete(Class<T> entity, List<Object> id)
			throws DBException {

		Element classElement = null;

		if (false == CheckEntityUtil.doCheck(entity)) {
			throw new DBException("所操作的类在xml中不存在！请检查！");
		}

		classElement = ReadXmlUtil.getElement(entity);

		String tableName = autil.getAnnotationTableName(entity);
		String primaryName = autil.getAnnotationPrimaryNameByField(entity);

		List<Element> primaryElements = parseSqlUtil.getColumnByPrimaryName(
				primaryName, classElement);
		List<Element> foreginElements = parseSqlUtil.getColumnByForeginName(
				primaryName, classElement);
		String sql = "delete from " + tableName + " where ";

		List<String> listTypes = new ArrayList<String>();

		Boolean flag = true;

		if (foreginElements.size() != 0) {
			if (foreginElements.get(0).attributeValue("name")
					.equals(primaryElements.get(0).attributeValue("name"))) {
				for (Element prop : primaryElements) {
					sql = sql + prop.attributeValue("column") + "=? and ";
				}
				for (Element elementF1 : foreginElements) {

					listTypes.add(elementF1.attributeValue("type"));

				}

				flag = false;
			} else {

			}

		}

		if (flag == true && primaryElements.size() != 0) {
			for (Element prop : primaryElements) {

				sql = sql + prop.attributeValue("column") + "=? and ";
				listTypes.add(prop.attributeValue("type"));
			}

		}

		sql = sql.substring(0, sql.lastIndexOf("and"));
		System.out.println(sql);

		// System.out.println(listTypes);
		// 调用模板类的更新方法;
		return daoOptemplate.getInstance().update(sql, id, listTypes, false);

	}