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

📄 productpk.java

📁 为大家提供了《精通EJB》(第三版)一书的源代码
💻 JAVA
字号:
package examples.cmp;import java.io.Serializable;/** * Primary Key class for our 'Product' Container-Managed * Entity Bean */public class ProductPK implements java.io.Serializable {    /*     * Note that the primary key fields must be a     * subset of the the container-managed Bean fields.     * The fields we are marking as container-managed in     * our Bean are productID, name, desc, and basePrice.     * Therefore our PK fields need to be from that set.     */    public String productID;    public ProductPK(String productID) {        this.productID = productID;    }    public ProductPK() {    }    public String toString() {        return productID.toString();    }    public int hashCode()    {        return productID.hashCode();    }    public boolean equals(Object prod)    {        return ((ProductPK)prod).productID.equals(productID);    }  }

⌨️ 快捷键说明

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