associationkey.java

来自「一个Java持久层类库」· Java 代码 · 共 31 行

JAVA
31
字号
//$Id: AssociationKey.java 7458 2005-07-12 20:12:57Z oneovthafew $package org.hibernate.engine;import java.io.Serializable;/** * Identifies a named association belonging to a particular * entity instance. Used to record the fact that an association * is null during loading. *  * @author Gavin King */final class AssociationKey implements Serializable {	private EntityKey ownerKey;	private String propertyName;		public AssociationKey(EntityKey ownerKey, String propertyName) {		this.ownerKey = ownerKey;		this.propertyName = propertyName;	}		public boolean equals(Object that) {		AssociationKey key = (AssociationKey) that;		return key.propertyName.equals(propertyName) && 			key.ownerKey.equals(ownerKey);	}		public int hashCode() {		return ownerKey.hashCode() + propertyName.hashCode();	}}

⌨️ 快捷键说明

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