• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Regarding Custom Finder Methods

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all...
I am new to WSAD and iam doing a project. I have to retrieve the total no of records from a particular table.Do i have to use the find methods or select methods? I think i have to use find methods,b'se if i use select methods,i cannot access them from my client - JSPs.Am i correct?
Iam using Collection as the return type for my find methods.my problem is that iam getting records,but they are being displayed as various symbols,numbers - as objects even though i typecast or use toString method to display them in string format.
And another question is, once i retreive a record, how to display the various fields? For this do i have to change my return type as the EJBObject so that i can use the get or set methods? Please help me as soon as possible as i have to submit my project soon.
Thank You.
Radha.
 
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Radha,
The result is returned as a collection of entity beans for you. You have to type cast it as a type of your Remote object.
And then, using this remote object you can get the details about this entity bean.
To find the number of records returned, you can just use the size method of the collection.
 
Power corrupts. Absolute power xxxxxxxxxxxxxxxx is kinda neat.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic