PaloT wrote:
> 
> We need also support for "order by" and criteria. I know we have
> findByCriteria but maybe findAll should be generated more like
> findByCriteria plus paging plus order by.
> 

"Order by" is actually supported, but one of my team mates found a bug in
the jpa impl of FindAll today CSC-425. I will fix that asap. It should be ok
for FindByCriteria.

Usage:
Repository PlanetRepository {
    findAll;
    findAll(String orderBy);
}

asc/desc is also supported:
findAll(String orderBy, boolean orderByAsc);


I realized that those optional parameters of the access objects are maybe a
hidden secret. If you look in the FindAllAccess interface you see extends
Ordered, which defines methods setOrderBy, setOrderByAsc.
Parameters of repository operation with corresponding names are used and
invokes the setters of the access objects. In this way it is possible to
support optional parameters in any combination. Pretty cool :-)

/Patrik

-- 
View this message in context: 
http://www.nabble.com/-sculptor--pagination-tp20636538s17564p25860725.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Fornax-developer mailing list
Fornax-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Reply via email to