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

📄 assigned.java

📁 人力资源管理系统主要包括:人员管理、招聘管理、培训管理、奖惩管理和薪金管理五大管理模块。
💻 JAVA
字号:
//$Id: Assigned.java,v 1.5.2.1 2003/08/09 04:36:34 oneovthafew Exp $package net.sf.hibernate.id;import java.io.Serializable;import net.sf.hibernate.HibernateException;import net.sf.hibernate.collection.PersistentCollection;import net.sf.hibernate.engine.SessionImplementor;/** * <b>assigned</b><br> * <br> * An <tt>IdentifierGenerator</tt> that returns the current identifier assigned  * to an instance. *  * @author Gavin King */public class Assigned implements IdentifierGenerator {		public Serializable generate(SessionImplementor session, Object obj) throws HibernateException {		if (obj instanceof PersistentCollection) throw new IdentifierGenerationException(			"Illegal use of assigned id generation for a toplevel collection"		);		final Serializable id = session.getPersister(obj).getIdentifier(obj);		if (id==null) throw new IdentifierGenerationException(			"ids for this class must be manually assigned before calling save(): " + obj.getClass().getName()		);		return id;	}}

⌨️ 快捷键说明

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