This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of The Career Toolkit and have Mark Herschberg on-line!
See this thread for details.
Win a copy of The Career Toolkit this week in the Jobs Discussion forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

ejbFind methods

 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was doing a mock exam from SoftLearn and came across a solution to a question that said that ejbFind methods must return a single primary key or its collection.

This has got me confused because I though that finder methods are defined on the home interface and a query in the DD and never in the bean class itself. So how can this be a solution to the problem?

Can anyone clear this up?

Thanks

Peter
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What you say is true for CMP, but for BMP you implement for each finder method in the home interface, a corresponding ejbFind method in the bean that returns (a collection of) the primary key.
 
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't finders return component interfaces (or collections of) that correspond to the primary key, and not the primary key itself.

James.
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The finder method defined on the home interface returns (collections of) component interfaces.

The corresponding ejbFind... method on the *bean* return (a collection of) primary keys though.
 
Paulus Maessen
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The finder method defined on the home interface returns (collections of) component interfaces.

The corresponding ejbFind... method on the *bean* return (a collection of) primary keys though.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic