product.java

来自「jsp数据库开发实例精粹全书原代码 无解压缩密码 包括 书店」· Java 代码 · 共 65 行

JAVA
65
字号
package zhaobiao.data;import java.util.*;/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2003</p> * <p>Company: </p> * @author unascribed * @version 1.0 */ public class Product implements Comparable{  private long product_id;  private long type_id;  private String product_content;  private String product_name;  private long maker_id;  public Product() {  }  public long getProduct_id() {    return product_id;  }  public void setProduct_id(long product_id) {    this.product_id = product_id;  }  public void setProduct_name(String product_name) {    this.product_name = product_name;  }  public String getProduct_name() {    return product_name;  }  public void setType_id(long type_id) {    this.type_id = type_id;  }  public long getType_id() {    return type_id;  }  public void setProduct_content(String product_content) {    this.product_content = product_content;  }  public String getProduct_content() {    return product_content;  }  public boolean equals(Object o)  {    if(product_id==((Product)o).getProduct_id())      return true;    else      return false;  }  public int compareTo(Object o)  {    long i2=((Product)o).getProduct_id();    return(i2<product_id?-1:(i2==product_id?0:1));  }  public void setMaker_id(long maker_id) {    this.maker_id = maker_id;  }  public long getMaker_id() {    return maker_id;  }}

⌨️ 快捷键说明

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