public void clearTransition ( Class < ? > clazz , final String name ) throws PersistenceException { final String cname = clazz . getName ( ) ; executeUpdate ( new Operation < Void > ( ) { public Void invoke ( Connection conn , DatabaseLiaison liaison ) throws SQLException , PersistenceException { PreparedStatement stmt = null ; try { stmt = conn . prepareStatement ( " delete from " + liaison . tableSQL ( "TRANSITIONS" ) + " where " + liaison . columnSQL ( "CLASS" ) + "=? " + " and " + liaison . columnSQL ( "NAME" ) + "=?" ) ; stmt . setString ( 1 , cname ) ; stmt . setString ( 2 , name ) ; stmt . executeUpdate ( ) ; // we don't care if it worked or not } finally { JDBCUtil . close ( stmt ) ; } return null ; } } ) ; }
Clear the transition .