postgreSQL数据库里面的numberic类型在JAVA中的相应类型为BigDecimal。
java.math.BigDecimal;
<HTML:RADIO>用法:
第一种方法:
你在Aform中的reset方法中为其赋值。
public class AActionForm extends ActionForm {
private String usertype;
public void setUsertype(String usertype){
this.usertype=usertype;
}
public String getUsertype(){
return this.usertype;
}
public void reset(ActionMapping actionMapping, HttpServletRequest httpServletRequest) {
usertype= "P";//在此处为属性扶植
}
}
第二种方法:
public class AAction extends Action
{
public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws
NWException
{
AActionForm aForm = (AActionForm) form;
aForm.setUsertype("p");
.......
}
博客介绍了PostgreSQL数据库中numberic类型在Java里对应的是BigDecimal类型,还给出了在Java中为属性赋值的两种方法,一是在Aform的reset方法中赋值,二是在AAction的execute方法中赋值。
41

被折叠的 条评论
为什么被折叠?



