Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Finders in Theory and Real Life  RSS feed

 
David Weitzman
Ranch Hand
Posts: 1365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the EJB 1.1 (or later) specification, what are the criteria for CMP finders? I know the boring stuff - 'findByPrimaryKey' and 'findAll' and 'findByName(String name)' but what if I want to do something more fancy? For example: findByNameAndAge(String n, int a) or findWhereAgeIsGreaterThan30AndLessThan40(). Are such things possible?
 
Tim Holloway
Bartender
Posts: 18713
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Done all the time!
 
sandy gupta
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<finder-query>< ![CDATA[(& (> balance $0) (! (= accountType 'checking')))]]></finder-query>
a very simple example from the wl docs where u chk for balance > 0 and also for an acct of type !checking
sahil
[This message has been edited by sandy ind (edited July 30, 2001).]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!