public void updatePostStatus ( final long postId , final Post . Status status ) throws SQLException { Connection conn = null ; PreparedStatement stmt = null ; try { conn = connectionSupplier . getConnection ( ) ; stmt = conn . prepareStatement ( updatePostStatusSQL ) ; stmt . setString ( 1 , status . toString ( ) . toLowerCase ( ) ) ; stmt . setLong ( 2 , postId ) ; stmt . executeUpdate ( ) ; } finally { SQLUtil . closeQuietly ( conn , stmt ) ; } }
Updates the status for a post .