Discussions

EJB programming & troubleshooting: question on ejb-ql

  1. question on ejb-ql (5 messages)

    Hi all, i'm relatively new in ejb programming and i've got a question to submit to everyone:

    i prepared a finder method on entity as this,

    SELECT DISTINCT l.title FROM TLibraries AS l...

    i don't understand if it returns a Collection of TLibrariesLocal or a Collection of String!!!

    Is there anyone that helps me?

    Thanks to all.

    Threaded Messages (5)

  2. question on ejb-ql[ Go to top ]

    This looks like an ejbSelect method that should return a collection of String(s). This is assuming that title is just a CMP field and not a CMR.

    Mike
  3. question on ejb-ql[ Go to top ]

    Finders ALWAYS return instances of the bean or collections of those instances
  4. question on ejb-ql[ Go to top ]

    Finders ALWAYS return instances of the bean or collections of those instances


    Very True.
  5. question on ejb-ql[ Go to top ]

    EJB Finder Methods always return a reference of Remote or Local Interfaces of a Bean.

    If we need a return value other than the reference of current bean's local/Remote interface then we go for ejbSelect() method.
  6. question on ejb-ql[ Go to top ]

    For example

    In a Company table,if we need to take details of all employees based on Designation,we can write a finder method like ejbFindByDesig().This method returns a Collection of The Company beans Local/Remote Interface references.
    Through the reference we can get the employees details like
    company.getName() etc.

     
    If we need a return of another entity beans reference then we go for ejbSelect() method.

    Return vaues as Collection of String sounds like
    ejbSelect(.But I am not sure.