Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.databases > #362
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail |
|---|---|
| From | "Ameen" <ameen@THRWHITE.remove-dii-this> |
| Subject | How to output record data |
| Message-ID | <5c4e18c0-655b-467b-abae-4febb31624fd@k1g2000prb.googlegroups.com> (permalink) |
| X-Comment-To | comp.lang.java.databases |
| Newsgroups | comp.lang.java.databases |
| Content-Type | text/plain; charset=IBM437 |
| Content-Transfer-Encoding | 8bit |
| X-Gateway | time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92] |
| Lines | 29 |
| Date | Wed, 27 Apr 2011 15:23:17 GMT |
| NNTP-Posting-Host | 96.60.20.240 |
| X-Complaints-To | news@tds.net |
| X-Trace | newsreading01.news.tds.net 1303917797 96.60.20.240 (Wed, 27 Apr 2011 10:23:17 CDT) |
| NNTP-Posting-Date | Wed, 27 Apr 2011 10:23:17 CDT |
| Organization | TDS.net |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.databases:362 |
Show key headers only | View raw
To: comp.lang.java.databases I have mysql database has Nationality table of ID and Name fields. In my Java application I am using entityManager to run a named query and get the result as List, as follow: // em is the entityManager. // Nationality.getAllRecord is a named query created in Nationality Entity Class, // it only selects all record from Nationality table. List qresult =3D em.createNamedQuery (=93Nationality.getAllRecord=94).getResultList(); It works fine and gets all the records. Even when I output the size of result List using qresult.size() it gives the correct result. Just I have one problem that is, how to output the data of each record fields. I know that each qresult List item represent a record, and I can get the specific record I need using qresult.get(int index) function but how to reach the fields/column in a particular record . I searched the Internet but I couldn't find any single example showing that. Can any one help me please? --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.databases | Previous | Next — Next in thread | Find similar
How to output record data "Ameen" <ameen@THRWHITE.remove-dii-this> - 2011-04-27 15:23 +0000
Re: How to output record "RedGrittyBrick" <redgrittybrick@THRWHITE.remove-dii-this> - 2011-04-27 15:23 +0000
Re: How to output record "Donkey Hottie" <donkey.hottie@THRWHITE.remove-dii-this> - 2011-04-27 15:23 +0000
csiph-web