@SuppressWarnings("rawtypes") public void getUserByLeader() { Relation r; List list = rd.getUserByLeader("leader"); Iterator it = list.iterator(); while (it.hasNext()) { r = (Relation) it.next(); System.out.println(r.getUf_id()); } }
@SuppressWarnings("rawtypes") @Test public void getUserByFollower() { Relation r; List list = rd.getUserByFollower("follower1"); Iterator it = list.iterator(); while (it.hasNext()) { r = (Relation) it.next(); System.out.println(r.getUl_id()); } }
public void save() { Relation r = new Relation(); r.setUf_id("follower3"); r.setUl_id("leader"); rd.save(r); }