File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes getting results from uniqueResult() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic

getting results from uniqueResult()

Aaron Parker

Joined: Jan 31, 2004
Posts: 27
How do I get results out of the uniqueResult() method of the Query class. I can get a result into it, but I can't find anything that explain how to get stuff out!

Object results;
results = query.uniqueResult();
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33124

Is the Query class from a library? What is the package name?

There is a, but I don't think that's the one you are referring to.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

Apparently it's a Hibernate thing, but in any case this is a duplicate so this copy will be closed.

Please don't post the same question in multiple forums, it creates duplicate conversations and wastes the time of the people trying to help you.

I agree. Here's the link:
subject: getting results from uniqueResult()
It's not a secret anymore!