locationkey.java

来自「一个简单的EJB实例.用DB2连接.JSP页面.很好用.供大家学习」· Java 代码 · 共 39 行

JAVA
39
字号
package salesdb;
/**
 * Key class for Entity Bean: Location
 */
public class LocationKey implements java.io.Serializable {
	static final long serialVersionUID = 3206093459760846163L;
	/**
	 * Implementation field for persistent attribute: zipcode
	 */
	public java.lang.String zipcode;
	/**
	 * Creates an empty key for Entity Bean: Location
	 */
	public LocationKey() {
	}
	/**
	 * Creates a key for Entity Bean: Location
	 */
	public LocationKey(java.lang.String zipcode) {
		this.zipcode = zipcode;
	}
	/**
	 * Returns true if both keys are equal.
	 */
	public boolean equals(java.lang.Object otherKey) {
		if (otherKey instanceof salesdb.LocationKey) {
			salesdb.LocationKey o = (salesdb.LocationKey) otherKey;
			return ((this.zipcode.equals(o.zipcode)));
		}
		return false;
	}
	/**
	 * Returns the hash code for the key.
	 */
	public int hashCode() {
		return (zipcode.hashCode());
	}
}

⌨️ 快捷键说明

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