Win a copy of liveProject: Protecting User Data with Spring Security and OAuth2 this week in the Spring 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

the question from whizlab

 
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which of the following statements are true?
1.ejbFind() returns the Primary Key.
2.The find method/s in the Home interface return an EJBObject or an Enumeration.
author's answer is that 1 and 2 are right.
my questions are:
1. I know ejbFindByPrimaryKey(PrimaryKey) but can not understand ejbFind(), what does it find?
2.ejbFindByXXX return Collection (or numeration), the associated finder in home would return Collection (or numeration),why it can return EJBObject?
please help to understand these questions, thanks
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Author's question is not clear.
By ejbFind(), I think, the author means the finder methods in Bean. He doesn't specify whether its on Home or in Bean.
Finder method in Beans always returns PrimaryKey/Collection of primary keys. Home, interprets this call and returns the apropriate remote references to the Beans (single reference or collection of references)
 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jp Vinjamoori:
Author's question is not clear.
By ejbFind(), I think, the author means the finder methods in Bean. He doesn't specify whether its on Home or in Bean.


ejbFind() can only be in bean. if the ejbFind() method would be in home, it would be a business method (implemented by ejbHomeEjbFind() in bean).
[ March 17, 2003: Message edited by: Dragan Milic ]
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic