addressid.java

来自「介绍了hibernate的入门有一些基本常用的事例」· Java 代码 · 共 42 行

JAVA
42
字号
//$Id: AddressId.java,v 1.2 2005/02/12 07:27:31 steveebersole Exp $package org.hibernate.test.typedonetoone;import java.io.Serializable;/** * @author Gavin King */public class AddressId implements Serializable {	private String type;	private String customerId;		public AddressId(String type, String customerId) {		this.customerId = customerId;		this.type = type;	}		public AddressId() {}		public String getType() {		return type;	}	public void setType(String type) {		this.type = type;	}	public String getCustomerId() {		return customerId;	}	public void setCustomerId(String customerId) {		this.customerId = customerId;	}	public boolean equals(Object other) {		if ( !(other instanceof AddressId) ) return false;		AddressId add = (AddressId) other;		return type.equals(add.type) && customerId.equals(add.customerId);	}	public int hashCode() {		return customerId.hashCode() + type.hashCode();	}}

⌨️ 快捷键说明

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