📄 hashmaphandler.java
字号:
package com.baosight.util;
import java.sql.ResultSet;
import java.util.HashMap;
public class HashMapHandler implements ResultSetHandler {
public Object processRow(ResultSet rs)throws Exception{
HashMap info = new HashMap();
int colCount = rs.getMetaData().getColumnCount();
for( int j=1;j<=colCount;j++){
String colName = rs.getMetaData().getColumnName(j).toLowerCase();
String rt = rs.getString(j);
if( rt == null ) rt = "";
if( rt.equals("null"))rt = "";
info.put(colName,rt );
}
return info;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -