Hi,
How to get all records from table without having any WHERE condition in CMP.
I know, jBoss is providing a method called FindAll(). This method returns the Collection Object which contains all the records from table.
SQL stmt :
select * from tablename;
I think, this method is vendor specific. Is there any mechanism or method thru which I can all records from table in case of CMP which is not vendor specific. Otherwise, how we can get by using weblogic server.
Thanks in advance,
Devi
-
How to get all records from table in case of CMP? (4 messages)
- Posted by: U V
- Posted on: August 15 2001 19:35 EDT
Threaded Messages (4)
- How to get all records from table in case of CMP? by Nathan Bronson on August 16 2001 11:29 EDT
- How to get all records from table in case of CMP? by U V on August 16 2001 14:39 EDT
-
How to get all records from table in case of CMP? by Praveen Balakrishnan on August 16 2001 05:07 EDT
- How to get all records from table in case of CMP? by U V on August 20 2001 01:50 EDT
-
How to get all records from table in case of CMP? by Praveen Balakrishnan on August 16 2001 05:07 EDT
- How to get all records from table in case of CMP? by U V on August 16 2001 14:39 EDT
-
How to get all records from table in case of CMP?[ Go to top ]
- Posted by: Nathan Bronson
- Posted on: August 16 2001 11:29 EDT
- in response to U V
Add a findAll() function to your home interface, then set the where clause to "TRUE", so that the resulting SQL is
SELECT * FROM tablename WHERE TRUE; -
How to get all records from table in case of CMP?[ Go to top ]
- Posted by: U V
- Posted on: August 16 2001 14:39 EDT
- in response to Nathan Bronson
Where to set where clause to TRUE.
Can U give syntactical steps
Thanks
Devi -
How to get all records from table in case of CMP?[ Go to top ]
- Posted by: Praveen Balakrishnan
- Posted on: August 16 2001 17:07 EDT
- in response to U V
or you can put an expression that returns true always ..
( something like "SELECT * FROM TABLENAME WHERE 1 = 1" ) -
How to get all records from table in case of CMP?[ Go to top ]
- Posted by: U V
- Posted on: August 20 2001 13:50 EDT
- in response to Praveen Balakrishnan
Hi,
I understood what you want to say.
At CMP, if I use findAll() method in home interface, I hope I donot need to define any implementation at ejb bean.
In xml file, Is there any thing corresponding to this method, should define. If we have to define the query, then what is the syntax in xml file for this method. Since, there is no parameters for this method.
One more, In case of JBoss server, I donot need to define the method information even in xml file especially for findAll() method. If I call remotely this method, container will return all records(objects) as Collection Object.
Is this method representation is vendor specific ?
Is this same even for weblogic ?If not, how to define in xml file.
Thanks,
Devi