HHH-2412 - Support for JDBC4

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@17781 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Steve Ebersole 2009-10-16 15:34:39 +00:00
parent b759f3ca1f
commit 7eb946fec5
2 changed files with 18 additions and 0 deletions

View File

@ -104,6 +104,15 @@ public class BlobProxy implements InvocationHandler {
stream.close();
return null;
}
if ( "toString".equals( method.getName() ) ) {
return this.toString();
}
if ( "equals".equals( method.getName() ) ) {
return Boolean.valueOf( proxy == args[0] );
}
if ( "hashCode".equals( method.getName() ) ) {
return new Integer( this.hashCode() );
}
throw new UnsupportedOperationException( "Blob may not be manipulated from creating session" );
}

View File

@ -106,6 +106,15 @@ public class ClobProxy implements InvocationHandler {
reader.close();
return null;
}
if ( "toString".equals( method.getName() ) ) {
return this.toString();
}
if ( "equals".equals( method.getName() ) ) {
return Boolean.valueOf( proxy == args[0] );
}
if ( "hashCode".equals( method.getName() ) ) {
return new Integer( this.hashCode() );
}
throw new UnsupportedOperationException( "Clob may not be manipulated from creating session" );
}