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

📄 classtype.java

📁 人力资源管理系统主要包括:人员管理、招聘管理、培训管理、奖惩管理和薪金管理五大管理模块。
💻 JAVA
字号:
//$Id: ClassType.java,v 1.4.2.6 2003/12/13 15:43:52 oneovthafew Exp $package net.sf.hibernate.type;import java.sql.PreparedStatement;import java.sql.ResultSet;import java.sql.SQLException;import net.sf.hibernate.Hibernate;import net.sf.hibernate.HibernateException;import net.sf.hibernate.util.EqualsHelper;import net.sf.hibernate.util.ReflectHelper;/** * <tt>class</tt>: A type that maps an SQL VARCHAR to a Java Class. * @author Gavin King */public class ClassType extends ImmutableType {		public Object get(ResultSet rs, String name) throws HibernateException, SQLException {		String str = (String) Hibernate.STRING.get(rs, name);		if (str == null) {			return null;		}		else {			try {				return ReflectHelper.classForName(str);			}			catch (ClassNotFoundException cnfe) {				throw new HibernateException("Class not found: " + str);			}		}	}		public void set(PreparedStatement st, Object value, int index) throws HibernateException, SQLException {		//TODO: would be nice to handle proxy classes elegantly!		Hibernate.STRING.set(st, ( (Class) value ).getName(), index);	}		public int sqlType() {		return Hibernate.STRING.sqlType();	}		public String toString(Object value) throws HibernateException {		return ( (Class) value ).getName();	}		public Class getReturnedClass() {		return Class.class;	}		public boolean equals(Object x, Object y) throws HibernateException {		return EqualsHelper.equals(x, y);	}		public String getName() {		return "class";	}		public Object fromStringValue(String xml) throws HibernateException {		try {			return ReflectHelper.classForName(xml);		}		catch (ClassNotFoundException cnfe) {			throw new HibernateException("could not parse xml", cnfe);		}	}	}

⌨️ 快捷键说明

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