|
Would it be too much to assume that the List could be referenced directly
from JSPs and more specifically from JSF tags? Would the List be suitable for
consumption by the "presentation layer"?
Thanks, Sarah. Your example of a retrieveRegistrations() method offers a good illustration of building a collection of rows and columns from an SQL result set. Would it be too much to assume that the List could be referenced directly from JSPs and more specifically from JSF tags? Would the List be suitable for consumption by the "presentation layer"? At this point you've only characterized it as a Data Access Object.
Nathan.
----- Original Message ----
From: Sarah Poger Gladstone <listmember@xxxxxxxxxxxxxx>
To: Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>
Sent: Monday, July 7, 2008 4:19:35 PM
Subject: Re: [WEB400] Mapping SQL Result Sets to Browsers
Nathan - Below I have pasted a method for my DAO example that shows an
example of a multi-row, multi-column result from a query:
public List retrieveRegistrations(){
List reg_list = null;
reg_list = getSimpleJdbcTemplate().queryForList( "Select * from PERSON" );
return reg_list;
}
If there are 3 records each with 2 columns, then the list returned
will look like:
List{
0 - Map {FIRST_NAME= "Sarah", LAST_NAME="Gladstone"}
1 - Map {FIRST_NAME= "Simone", LAST_NAME="Gladstone"}
2 - Map {FIRST_NAME= "John", LAST_NAME="Doe"}
--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.