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.
-
question on ejb-ql (5 messages)
- Posted by: franco mangia
- Posted on: May 27 2003 11:09 EDT
Threaded Messages (5)
- question on ejb-ql by Michael Malkinzon on May 27 2003 15:22 EDT
- question on ejb-ql by Aaron Robinson on June 01 2003 05:27 EDT
- question on ejb-ql by Mohit Jain on June 09 2003 04:55 EDT
- question on ejb-ql by Arun Kumar Xavier on June 12 2003 09:50 EDT
- question on ejb-ql by Arun Kumar Xavier on June 12 2003 10:08 EDT
-
question on ejb-ql[ Go to top ]
- Posted by: Michael Malkinzon
- Posted on: May 27 2003 15:22 EDT
- in response to franco mangia
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 -
question on ejb-ql[ Go to top ]
- Posted by: Aaron Robinson
- Posted on: June 01 2003 05:27 EDT
- in response to franco mangia
Finders ALWAYS return instances of the bean or collections of those instances -
question on ejb-ql[ Go to top ]
- Posted by: Mohit Jain
- Posted on: June 09 2003 04:55 EDT
- in response to Aaron Robinson
Finders ALWAYS return instances of the bean or collections of those instances
Very True. -
question on ejb-ql[ Go to top ]
- Posted by: Arun Kumar Xavier
- Posted on: June 12 2003 09:50 EDT
- in response to franco mangia
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. -
question on ejb-ql[ Go to top ]
- Posted by: Arun Kumar Xavier
- Posted on: June 12 2003 10:08 EDT
- in response to franco mangia
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.