/** * Store the exceptions file. * * @param itr iterator * @throws SQLException SQLException */ protected void storeExceptions(Iterator<Exc> itr) throws SQLException { log.info("storing exceptions"); PreparedStatement exStmt = connection.prepareStatement("INSERT INTO exceptions VALUES(?,?,?,?)"); while (itr.hasNext()) { Exc exc = itr.next(); exStmt.setString(4, exc.getLemma()); for (Object o : exc.getExceptions()) { exStmt.setInt(1, nextId()); exStmt.setString(2, exc.getPOS().getKey()); exStmt.setString(3, (String) o); exStmt.addBatch(); } } exStmt.executeBatch(); log.info("stored exceptions"); } }
@Override public void addException(Exc exc) throws JWNLException { super.addException(exc); getTable(exc.getPOS(), DictionaryFileType.EXCEPTION).put(exc.getKey(), exc); }
/** * Store the exceptions file. * * @param itr iterator * @throws SQLException SQLException */ protected void storeExceptions(Iterator<Exc> itr) throws SQLException { log.info("storing exceptions"); PreparedStatement exStmt = connection.prepareStatement("INSERT INTO exceptions VALUES(?,?,?,?)"); while (itr.hasNext()) { Exc exc = itr.next(); exStmt.setString(4, exc.getLemma()); for (Object o : exc.getExceptions()) { exStmt.setInt(1, nextId()); exStmt.setString(2, exc.getPOS().getKey()); exStmt.setString(3, (String) o); exStmt.addBatch(); } } exStmt.executeBatch(); log.info("stored exceptions"); } }
@Override public void addException(Exc exc) throws JWNLException { super.addException(exc); getTable(exc.getPOS(), DictionaryFileType.EXCEPTION).put(exc.getKey(), exc); }
@Override public void removeException(Exc exc) throws JWNLException { getTable(exc.getPOS(), DictionaryFileType.EXCEPTION).remove(exc.getKey()); super.removeException(exc); }
@Override public void removeException(Exc exc) throws JWNLException { getTable(exc.getPOS(), DictionaryFileType.EXCEPTION).remove(exc.getKey()); super.removeException(exc); }
@Override public void removeException(Exc exc) throws JWNLException { clearException(exc.getPOS(), exc.getKey()); super.removeException(exc); }
@Override public void removeException(Exc exc) throws JWNLException { clearException(exc.getPOS(), exc.getKey()); super.removeException(exc); }