⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ex8_9.txt

📁 j2ee core design patterns
💻 TXT
字号:
Example 8.9 CustomerDAO.java: Creating the RowSetWrapperList
package com.corej2eepatterns.dao;

// imports

public class CustomerDAO {
	. . .  

	public List findCustomersRL(
			CustomerTO cust, int startAtRow, int howManyRows) 
			throws Exception{
		// create the search SQL string 
		String searchSQLString = getSearchSQLString(cust);

		// execute the search
		return executeSearch(searchSQLString,    
				StartAtRow, howManyRows);
	}

	private List executeSearch(
			String searchSQLString, int startAtRow,
			int howManyRows)
			throws Exception {

		RowSetWrapperList results = null;
		try {
			RowSet rowSet = getRORowSet(searchSQLString, 
					int startAtRow,
					int howManyRows);

			results = new RowSetWrapperList (rowSet);
		} catch (Exception ex) {
			throw new Exception(ex);
		} 

		return results;
	}

	private String getSearchSQLString(CustomerTO cust) {
		// convenience method to create and return
		// a 揝ELECT

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -