• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

ejbFind methods

 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
This is my favorite show. And this is my favorite tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic