壓陣崙匂怏周嚥庁侏怏周岻寂勧僕方象
扮寂:2009-10-14 javaeye lgx2351
MVC崇尺嶄?陣崙匂怏周嚥庁侏怏周俶勣?札勧僕方象?厘断辛參亟倖javaBean栖隠贋。
ParamBean宸倖javaBean云嵎貧頁委方象慧壓hashtable嶄?旺戻工阻贋慧才函竃方象吉圭隈。
旗鷹泌和?
Java旗鷹
public class ParamBean implements Serializable {
// 荷恬埀喘薩旗鷹(喘噐晩崗?幣)
private String opr_code = "";
// 喘薩何壇旗鷹(喘噐晩崗?幣)
private String dep_code = "";
// 輝念荷恬議暇汽(喘噐晩崗?幣)
private String menu_code = "";
// 輝念荷恬議傍苧(喘噐晩崗?幣)
private String op_desc = "";
// 卦指旗鷹(0燕幣撹孔)
private int ret_code;
// 危列佚連
private String err_msg = "";
private Hashtable ht;
private CachedRowSet crs;
/**
* 更夛痕方
*/
public ParamBean() {
opr_code = "";
err_msg = "";
ret_code = 0;
ht = new Hashtable();
crs = null;
}
/**
* 譜崔佚連
*/
public void set_info(String opr_code, String dep_code, String menu_code,
String op_desc) {
this.opr_code = opr_code;
this.dep_code = dep_code;
this.menu_code = menu_code;
this.op_desc = op_desc;
}
/**
* 耶紗歌方欺込錬燕
*/
public void add_param(String param_name, Object param_value) {
if (param_name == null || param_value == null)
return;
param_name.trim();
if (param_name.equalsIgnoreCase(""))
return;
this.ht.put(param_name, param_value);
}
/**
* 貫歌方込錬燕嶄資函歌方
*/
public Object get_param(String param_name) {
if (param_name != null) {
param_name.trim();
if (!param_name.equalsIgnoreCase("")) {
return ht.get(param_name);
}
}
return null;
}
/**
* 貫歌方込錬燕嶄評茅歌方
*/
public void remove_param(String param_name) {
if (param_name != null) {
param_name.trim();
if (!param_name.equalsIgnoreCase("")) {
ht.remove(param_name);
}
}
}
/**
* 函込錬燕嶄議歌方倖方
*/
public int get_param_count() {
return this.ht.size();
}
/**
* 賠腎歌方(歌方涙倬勧指人薩極)
*/
public void clear_param() {
this.ht.clear();
}
/**
* 譜崔CRS
*/
public boolean set_crs(ResultSet rs) {
boolean ok = false;
try {
crs = new CachedRowSetImpl();
crs.populate(rs);
ok = true;
} catch (Exception e) {
e.printStackTrace();
}
return ok;
}
/**
* 譜崔危列佚連?揖扮崔ret_code葎-1
*/
public
|