Hi, if you wanna use your own sort algorithm, you can make it as helper class and it will be used in your DAO impl class
example: public class SortEngine { public static List sortById(List list) { ... } } public class MyDAOImpl extends MyDAO { ... public List getSortedData(String attr) throws ABCException { ... List list = .....; return SortEngine.sortById(list); } ... } In your action, just excute method in MyDAOImpl through your facade or service gateway ... On 9/26/06, Gomathi <[EMAIL PROTECTED]> wrote:
Hai u said using direct ssql Where i give this sql query, I have one method to sort I have to use inside this method or? ----- Original Message ----- From: "Li" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <user@struts.apache.org> Sent: Tuesday, September 26, 2006 11:46 AM Subject: Re: sort the list > It 's better if you can store sorted one in different list. And it is > better > you retrieve sorted data from your persistent layer or dao .... > > * you can use direct sql query > * or use object mapping like hibernate > > Good luck > > On 9/26/06, Gomathi <[EMAIL PROTECTED]> wrote: >> >> Hai, >> I have one arralist,I have to sort that list by using the lastname and >> the sorted list store in samelist. >> How to solve this >> Thanks and advance >> gomathi >> > > > > -- > When we invent time, we invent death. > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- When we invent time, we invent death.