public void save() {
		if (this.getServer() == null) {
			System.out.println("Cannot save file without server");
			return;
		}
		Database db = getServer().getController().getDb();
		if (getId() == 0) { // new
			try {
				db.insertOne("files", columns, getCreatedAt(), getModifiedAt(), getServerid(),
						getServercategoryid(), getCategoryid(), getName(),
						getDisplayname(), getDirectory(),
						getDisplaydirectory(), getType(), getFlag(),
						isDuplicate(), getExtension(), getPath(), getServerpath());
			} catch (SQLException e) {
				e.printStackTrace();
			}
		} else {
			try {
				// TODO: implement update for more vars.
				db.updateQuery("UPDATE `files` SET flag = ?, duplicate = ?, modified_at WHERE id = ?",
						getFlag(), isDuplicate(), getModifiedAt(), getId());
			} catch (SQLException e) {
				e.printStackTrace();
			}
		}
	}