unresolvableobjectexception.java
来自「人力资源管理系统主要包括:人员管理、招聘管理、培训管理、奖惩管理和薪金管理五大管」· Java 代码 · 共 50 行
JAVA
50 行
//$Id: UnresolvableObjectException.java,v 1.1.2.2 2003/12/16 12:13:47 oneovthafew Exp $package net.sf.hibernate;import java.io.Serializable;/** * Thrown when Hibernate could not resolve an object by id, especially when * loading an association. * * @author Gavin King */public class UnresolvableObjectException extends HibernateException { private final Serializable identifier; private final Class clazz; public UnresolvableObjectException(Serializable identifier, Class clazz) { this("No row with the given identifier exists", identifier, clazz); } UnresolvableObjectException(String message, Serializable identifier, Class clazz) { super(message); this.identifier = identifier; this.clazz = clazz; } public Serializable getIdentifier() { return identifier; } public String getMessage() { return super.getMessage() + ": " + identifier + ", of class: " + clazz.getName(); } public Class getPersistentClass() { return clazz; } public static void throwIfNull(Object o, Serializable id, Class clazz) throws UnresolvableObjectException { if (o==null) { throw new UnresolvableObjectException(id, clazz); } } }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?