public void setBodyFilter ( int pathId , String bodyFilter ) { PreparedStatement statement = null ; try ( Connection sqlConnection = sqlService . getConnection ( ) ) { statement = sqlConnection . prepareStatement ( "UPDATE " + Constants . DB_TABLE_PATH + " SET " + Constants . PATH_PROFILE_BODY_FILTER + " = ? " + " WHERE " + Constants . GENERIC_ID + " = ?" ) ; statement . setString ( 1 , bodyFilter ) ; statement . setInt ( 2 , pathId ) ; statement . executeUpdate ( ) ; statement . close ( ) ; } catch ( SQLException e ) { e . printStackTrace ( ) ; } finally { try { if ( statement != null ) { statement . close ( ) ; } } catch ( Exception e ) { } } }
Sets the body filter for this ID