通过系统把几乎所有与人力资源相关的数据统一管理

源代码在线查看: key.java

软件大小: 23949 K
上传用户: RR15133422795
关键词: 人力资源 数据
下载地址: 免注册下载 普通下载 VIP

相关代码

				//$Id: Key.java,v 1.7.2.2 2003/08/09 11:24:49 turin42 Exp $				package net.sf.hibernate.engine;								import java.io.Serializable;								import net.sf.hibernate.AssertionFailure;				import net.sf.hibernate.persister.ClassPersister;								/**				 * A globally unique identifier of an instance.				 *				 * Consisting of the user-visible identifier and the identifier space (eg. tablename).				 *				 * @author Gavin King				 */				public final class Key implements Serializable {					private final Serializable id;					private final Serializable identifierSpace;					private final Class clazz;										private Key(Serializable id, Serializable identifierSpace, Class clazz) {						if (id==null) throw new AssertionFailure("null identifier");						this.id=id;						this.identifierSpace = identifierSpace;						this.clazz = clazz;					}										/**					 * Construct a unique identifier for an entity class instance					 */					public Key(Serializable id, ClassPersister p) {						this( id, p.getIdentifierSpace(), p.getMappedClass() );					}										/**					 * Get the user-visible identifier					 */					public Serializable getIdentifier() {						return id;					}										public Class getMappedClass() {						return clazz;					}										public boolean equals(Object other) {						Key otherKey = (Key) other;						return otherKey.identifierSpace.equals(this.identifierSpace) && otherKey.id.equals(this.id);					}										public int hashCode() { return id.hashCode(); }										public String toString() {						return id.toString();					}				}																															

相关资源