baseform.java

来自「我在加拿大学习的一个比较复杂的在线银行程序.」· Java 代码 · 共 144 行

JAVA
144
字号
package com.ebusiness.ebank.form;/** * <p>Title: Baseform </p> * <p>Description: base form bean for all form beans </p> * <p>Copyright: Copyright (c) 2005</p> * <p>Company: eBusiness Inc., All right reserved</p> * @author unascribed * @version 1.0 */import java.util.Locale;import org.apache.struts.validator.ValidatorActionForm;import com.ebusiness.ebank.bean.Value;import com.ebusiness.ebank.util.FieldHelper;public class BaseForm extends ValidatorActionForm{    private long objectID;    private String effectiveDate;    private String expiryDate;    private String createUserID;    private String createDate;    private String updateUserID;    private String updateDate;    private String action;    public long getObjectID()    {        return this.objectID;    }    public void setObjectID(long objectID)    {        this.objectID = objectID;    }    public String getEffectiveDate()    {        return this.effectiveDate;    }    public void setEffectiveDate(String effectiveDate)    {        this.effectiveDate = effectiveDate;    }    public String getExpiryDate()    {        return this.expiryDate;    }    public void setExpiryDate(String expiryDate)    {        this.expiryDate = expiryDate;    }    public String getCreateUserID()    {        return this.createUserID;    }    public void setCreateUserID(String createUserID)    {        this.createUserID = createUserID;    }    public String getCreateDate()    {        return this.createDate;    }    public void setCreateDate(String createDate)    {        this.createDate = createDate;    }    public String getUpdateUserID()    {        return this.updateUserID;    }    public void setUpdateUserID(String updateUserID)    {        this.updateUserID = updateUserID;    }    public String getUpdateDate()    {        return this.updateDate;    }    public void setUpdateDate(String updateDate)    {        this.updateDate = updateDate;    }    public String getAction()    {       return this.action;    }    public void setAction(String action)    {        this.action = action;    }    protected static void mappingFromModel(Value value, BaseForm form, Locale locale)    {        form.setObjectID(value.getObjectID());        form.setEffectiveDate(FieldHelper.convertToString(value.getEffectiveDate(), locale));        form.setExpiryDate(FieldHelper.convertToString(value.getExpiryDate(), locale));        form.setCreateUserID(value.getCreateUserID());        form.setCreateDate(FieldHelper.convertToString(value.getCreateDate(), locale));        form.setUpdateUserID(value.getUpdateUserID());        form.setUpdateDate(FieldHelper.convertToString(value.getUpdateDate(), locale));        form.setAction(value.getAction());    }    protected void mappingToModel(Value value, Locale locale)    {        value.setObjectID(this.getObjectID());        value.setEffectiveDate(FieldHelper.convertToTimestamp(this.getEffectiveDate(), locale));        value.setExpiryDate(FieldHelper.convertToTimestamp(this.getExpiryDate(), locale));        value.setCreateUserID(this.getCreateUserID());        value.setCreateDate(FieldHelper.convertToTimestamp(this.getCreateDate(), locale));        value.setUpdateUserID(this.getUpdateUserID());        value.setUpdateDate(FieldHelper.convertToTimestamp(this.getUpdateDate(), locale));        value.setAction(value.getAction());    }    protected void clear()    {        objectID = 0;        effectiveDate = "";        expiryDate    = "";        createUserID  = "";        createDate    = "";        updateUserID  = "";        updateDate    = "";        action        = "";    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?