@Test public void changeRanking() { populateRankingData(); try (Session session = factory.openSession()) { Transaction tx = session.beginTransaction(); Query<Ranking> query = session.createQuery("from Ranking r " + "where r.subject.name=:subject and " + "r.observer.name=:observer and " + "r.skill.name=:skill", Ranking.class); query.setParameter("subject", "J. C. Smell"); query.setParameter("observer", "Gene Showrama"); query.setParameter("skill", "Java"); Ranking ranking = query.uniqueResult(); assertNotNull(ranking, "Could not find matching ranking"); ranking.setRanking(9); tx.commit(); } assertEquals(getAverage("J. C. Smell", "Java"), 8); }
public void setRanking(Integer ranking) { this.ranking = ranking; }
Ranking { public void setRanking(Integer ranking) { this.ranking = ranking; } }
Ranking { public void setRanking(Integer ranking) { this.ranking = ranking; } Ranking(); }
Ranking { public void setRanking(Integer ranking) { this.ranking = ranking; } Ranking(); Long getId(); void setId(Long id); Person getSubject(); void setSubject(Person subject); Person getObserver(); void setObserver(Person observer); Skill getSkill(); void setSkill(Skill skill); Integer getRanking(); void setRanking(Integer ranking); @Override String toString(); }
Ranking { public void setRanking(Integer ranking) { this.ranking = ranking; } Ranking(); Long getId(); void setId(Long id); Person getSubject(); void setSubject(Person subject); Person getObserver(); void setObserver(Person observer); Skill getSkill(); void setSkill(Skill skill); Integer getRanking(); void setRanking(Integer ranking); @Override String toString();  }