product.java

来自「JAVA写的网上购物系统原代码」· Java 代码 · 共 47 行

JAVA
47
字号
package test.models;

import java.io.*;
import java.util.Date;

/**
 *Product JavaBean代表了商品的信息
 */
public class Product implements Serializable {

  /* Private Fields */

  private String productId;
  private String categoryId;
  private String name;
  private String description;
  private Date registerTime ;
  private int isPromot;

  /* JavaBeans Properties */

  public String getProductId() { return productId; }
  public void setProductId(String productId) { this.productId = productId.trim(); }

  public String getCategoryId() { return categoryId; }
  public void setCategoryId(String categoryId) { this.categoryId = categoryId; }

  public String getName() { return name; }
  public void setName(String name) { this.name = name; }

  public String getDescription() { return description; }
  public void setDescription(String description) { this.description = description; }

  public Date getRegisterTime(){ return this.registerTime;}
  public void setrRegisterTime(Date t){this.registerTime=t;}

  public int getIsPromot(){ return this.isPromot;}
  public void setIsPromot(int isPromot){this.isPromot=isPromot;}

  /* Public Methods*/

  public String toString() {
    return getName();
  }

}

⌨️ 快捷键说明

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