急救:
我在DAO层中此方法的实现为
public static final Collection findWellBasicData(QueryFilter queryFilter,
int startNum, int endNum)
throws DAOException
{
Hashtable[] KeyNameValue = null;
String value = "";
Collection array = new ArrayList();
try{
DBconn dbconn = new DBconn();
ResultSet set = null;
String sql = "select * from c_well" +
(queryFilter.getWellName() == null ? "" : (" where "
+ queryFilter.getWellName()));
try {
set = dbconn.Query(sql);
if (set == null)
return array;
ResultSetMetaData rsmd = set.getMetaData();
//获取当前记录列数
int col = rsmd.getColumnCount();
//当前页中要显示的记录数
int row = endNum - startNum;
KeyNameValue = new Hashtable[row];
for (int i = 0; i < row; i++) {
KeyNameValue[i] = new Hashtable();
set.next();
for (int j = 1; j < col; j++) {
value = set.getString(j);
if (value == null)
value = "";
KeyNameValue[i].put(rsmd.getColumnName(j).toLowerCase().trim(),
value);
}
array.add(KeyNameValue[i]);
}
}
catch (Exception e) {}
}catch(Exception e){}
return array;
}
上面一段代码返回一个集合.
下面是代理层
public static final SingleWellBasicDataVo findWellBasicDataByPK(String
wellNo) throws BusinessException
{
return null;
}
这里的"return null"需要返回一个值对象.
我该怎么做呢?
谢谢!