@Override
	public boolean add(int prenodeid, Object item) {
		Timenode preitem = getTimenode(prenodeid); // 不然会关闭数据库链接
		System.out.println("preid " + preitem.getId());
		conn = SQLconnect.getConnection();
		if (item instanceof Timenode) {
			Timenode newitem = new Timenode();
			newitem = (Timenode) item;
			int newid = 0;
			ResultSet res;
			try {
				String sql = String
						.format("INSERT INTO Timenodes (`nextnode`, `time_description`, `time_owner`, `display`,`event_headnode`)"
								+ " VALUES ('%s', '%s', '%s','%s','%s')",
								preitem.getNextnode(),
								newitem.getTime_description(),
								newitem.getTime_owner(), "true", 0);
				Statement st = (Statement) conn.createStatement(); // 创建用于执行静态sql语句的Statement对象
				System.out.println(sql);
				int count = st.executeUpdate(sql,
						Statement.RETURN_GENERATED_KEYS); // 执行插入操作的sql语句，并返回插入数据的个数
				if (count > 0) {// 记录保存成功
					res = st.getGeneratedKeys();
					if (res.next())
						newid = res.getInt(1);

				}
				System.out.println("newid " + newid);
				System.out.println("insert " + count + " entries" + " newid"
						+ newid); // 输出插入操作的处理结果 */
				conn.close(); // 关闭数据库连接
				preitem.setNextnode(newid);
				update(preitem);
				new EventNodeFactory().initEventnode(newid);
				return true;
			} catch (SQLException e) {
				System.out.println("插入数据失败 " + e.getMessage());
				return false;
			}
		}
		return false;
	}