Hi,
I have something like this:
public class Usr {
...
private List<MsgSubject> messageTopics = new ArrayList<MsgSubject>();
@OneToMany(mappedBy="usr")
public List<MsgSubject> getMessageTopics() {
return messageTopics;
}
...
I can retrieve the messageTopics using aUsr.getMessageTopics(), this returns a list as expected, now I'd like to get the messagesTopics according to a datefield in the object in a descending order, so that I can display only the last few entries in the table, any way to achieve this? thanks.
A.C.
|