65666768697071727374757677
} posts.add(linked); } public Status addStatus(User owner, String status) { Status st = new Status(); st.setStatus(status); st.setUser(owner); st.setTimestamp(new Date()); em.persist(st); addLinked(owner, st); return st; }
3839404142434445464748
public void setText(String text) { this.text = text; } public void post() { Status s = new Status(); s.setTimestamp(new Date()); s.setStatus(text); s.setUser(em.find(User.class, user.getId())); em.persist(s); }