public Integer getOverrideIdForMethod ( String className , String methodName ) { Integer overrideId = null ; PreparedStatement query = null ; ResultSet results = null ; try ( Connection sqlConnection = sqlService . getConnection ( ) ) { query = sqlConnection . prepareStatement ( "SELECT * FROM " + Constants . DB_TABLE_OVERRIDE + " WHERE " + Constants . OVERRIDE_CLASS_NAME + " = ?" + " AND " + Constants . OVERRIDE_METHOD_NAME + " = ?" ) ; query . setString ( 1 , className ) ; query . setString ( 2 , methodName ) ; results = query . executeQuery ( ) ; if ( results . next ( ) ) { overrideId = results . getInt ( Constants . GENERIC_ID ) ; } } catch ( SQLException e ) { e . printStackTrace ( ) ; return null ; } finally { try { if ( results != null ) { results . close ( ) ; } } catch ( Exception e ) { } try { if ( query != null ) { query . close ( ) ; } } catch ( Exception e ) { } } return overrideId ; }
Gets an overrideID for a class name method name