public static void addFilterToUser(int userId, String filterstring) throws SQLException {
Connection connection = helper.getConnection();
Timestamp datetime = new Timestamp(new Date().getTime());
try {
QueryRunner run = new QueryRunner();
String propNames = "Titel, Wert, IstObligatorisch, DatentypenID, Auswahl, creationDate, BenutzerID";
Object[] param = { "_filter", filterstring, false, 5, null, datetime, userId };
String sql = "INSERT INTO " + "benutzereigenschaften" + " (" + propNames + ") VALUES ( ?, ?,? ,? ,? ,?,? )";
logger.debug(sql.toString() + ", " + param);
run.update(connection, sql, param);
} finally {
closeConnection(connection);
}
}