Is there any difference between finder and select?

Discussions

EJB programming & troubleshooting: Is there any difference between finder and select?

  1. do you use jb6?
    right click a entity bean ,there is a menu,through it you can add a new finder or add a new select,but I don't know the difference between them!
  2. I wish my entity beans had menus :-)

    A finder returns the interface of the bean you have the finder in: eg if you have a finder for the StudentsEntityBean, then the finder will return a StudentEntityBeanInterface (remote or local interface depending on what you have used)

    A select statement (not that I've used one yet), returns a value from a bean. eg a select on a SutentEntityBean could return "studentName".

    Daniel.
  3. Finder methods are methods that are called by clients of the bean to locate instances of the bean.
    Select methods are methods for the internal use of the bean: they cannot be called by clients directly and they don't have to return the bean's type.

    Gal