Hi!

Never persist search results: persist the parameters. ;)
Besides that, I'd remove the transactions field and make the getTransactions() method look like this:

public List<Transaction> getTransactions() {
        return (List<Transaction>) theSession.createCriteria(Transaction.class)
                .add(Restrictions.eq("msisdn", userInfo.getMsisdn()))
.add(Restrictions.not(Restrictions.in("transactionType", INVALID_TRANSACTION_TYPES)))
                .add(Restrictions.ge("transactionDate", startDate(fromDate)))
                .add(Restrictions.le("transactionDate",  endDate(toDate)))
.add(Restrictions.ge("partitionDate", Integer.parseInt(tformatter.format(fromDate)))) .add(Restrictions.le("partitionDate", Integer.parseInt(tformatter.format(toDate))))
                .addOrder(Order.asc("id")).list();
}

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to