public void AddHistory(History history) { try { for (History tmp : helper.Histories().queryForEq("Book", history.getBook())) { helper.Histories().deleteById(tmp.getId()); } helper.Histories().create(history); } catch (SQLException e) { e.printStackTrace(); } }
public List<History> GetAllHistories() { try { return helper.Histories().queryForAll(); } catch (SQLException e) { e.printStackTrace(); } return null; }