⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 converter.java

📁 首先确保MySQL4.0数据库已经正确安装
💻 JAVA
字号:
package edu.jnestore.util;import edu.jnestore.beans.*;import edu.jnestore.action.*;/** * This class provides methods to convert user input to data model beans */public class Converter{  private static Converter instance = new Converter();  /**   * get the instance of Converter   * @return instance of Converter Objecrt   */  public static Converter getInstance()  {    return instance;  }  private Converter()  {  }  /**   * convert a LoginActionForm object to an Account object   * @param loginActionForm   * @return convert result   */  public Account ConverterToAccount(LoginActionForm loginActionForm)  {    Account account = new Account();    account.setUserid(loginActionForm.getUserName());    account.setPassword(loginActionForm.getPassword());    return account;  }  /**   * convert a NewUserActionForm object to an Account object   * @param newUserActionForm   * @return   */  public Account ConverterToAccount(NewUserActionForm newUserActionForm)  {    Account account = new Account();    account.setUserid(newUserActionForm.getUserID());    account.setPassword(newUserActionForm.getPassword());    account.setEmail(newUserActionForm.getEmail());    account.setRealname(newUserActionForm.getRealName());    account.setAddress(newUserActionForm.getAddr());    account.setPostalcode(newUserActionForm.getPostalCode());    account.setPhone(newUserActionForm.getPhone());    return account;  }}

⌨️ 快捷键说明

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