This content has been marked as final.
Show 1 reply
-
1. Re: Can my entity beans implement java.lang.Comparable?
joelvogt Oct 22, 2002 1:39 AM (in response to icanoop)Do you need to run different sorts? If not you could specify your order in the finder for this collection. You could also specify a couple of finders if you did need different sorting.
Otherwise you should still be able to use your beans in a comparator class. Just don't call compareTo() on them, you will have to do something like bean.getName().compareTo(bean.getName()). It'll work the same.
Another solution is to extract the data from your remotes with a getValueObjectMethod(). These guys can then be stored in a collection and implement Comparable.