2004.12.14 这是elearning项目昨天发现的问题,postgreSQL数据库里面的numberic类型在JAVA中的相应类型为BigDecimal。

博客介绍了PostgreSQL数据库中numberic类型在Java里对应的是BigDecimal类型,还给出了在Java中为属性赋值的两种方法,一是在Aform的reset方法中赋值,二是在AAction的execute方法中赋值。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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");
.......
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值