Code example for HibernateException

0
 
		try { 
			return ReflectHelper.classForName( string );
		} 
		catch ( ClassNotFoundException e ) {
			throw new HibernateException( "Unable to locate named class " + string );
		} 
	} 
 
	@SuppressWarnings({ "unchecked" }) 
	public <X> X unwrap(Class value, Class<X> type, WrapperOptions options) {
		if ( value == null ) {
			return null; 
		} 
		if ( Class.class.isAssignableFrom( type ) ) {
			return (X) value;
		} 
		if ( String.class.isAssignableFrom( type ) ) {
			return (X) toString( value );
		}