From: <one...@us...> - 2002-12-25 02:00:19
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/type In directory sc8-pr-cvs1:/tmp/cvs-serv5389/hibernate/type Modified Files: BlobType.java ClobType.java Log Message: added ClobImpl, BlobImpl Index: BlobType.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/type/BlobType.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** BlobType.java 12 Dec 2002 11:33:36 -0000 1.1 --- BlobType.java 25 Dec 2002 02:00:15 -0000 1.2 *************** *** 6,14 **** import cirrus.hibernate.HibernateException; public class BlobType extends ImmutableType { public void set(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { ! st.setBlob(index, (Blob) value); } --- 6,20 ---- import cirrus.hibernate.HibernateException; + import cirrus.hibernate.lob.BlobImpl; public class BlobType extends ImmutableType { public void set(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { ! if (value instanceof BlobImpl) { ! st.setBytes(index, ( (BlobImpl) value ).toBytes() ); ! } ! else { ! st.setBlob(index, (Blob) value); ! } } Index: ClobType.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/type/ClobType.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ClobType.java 12 Dec 2002 11:33:36 -0000 1.1 --- ClobType.java 25 Dec 2002 02:00:15 -0000 1.2 *************** *** 6,14 **** import cirrus.hibernate.HibernateException; public class ClobType extends ImmutableType { public void set(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { ! st.setClob(index, (Clob) value); } --- 6,20 ---- import cirrus.hibernate.HibernateException; + import cirrus.hibernate.lob.ClobImpl; public class ClobType extends ImmutableType { public void set(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { ! if (value instanceof ClobImpl) { ! st.setString( index, ( (ClobImpl) value ).toString() ); ! } ! else { ! st.setClob(index, (Clob) value); ! } } |