Exemplo n.º 1
0
  private Dictionary resultToDictionary(ResultSet result) throws SQLException {
    Dictionary d = new Dictionary();

    d.setFk(result.getInt(COLUMN_FK));
    d.setType(DictionaryType.fromInt(result.getInt(COLUMN_TYPE)));
    d.setLang(result.getString(COLUMN_LANG));
    d.setValue(result.getString(COLUMN_VALUE));

    return d;
  }
Exemplo n.º 2
0
  public void add(int fk, Map<String, Dictionary> map) throws DAOException {

    // Add each instance of Dictionary in the map
    Set<String> keys = map.keySet();
    for (String key : keys) {
      Dictionary d = map.get(key);
      d.setFk(fk);

      add(d);
    }
  }