Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/type In directory sc8-pr-cvs1:/tmp/cvs-serv20713/hibernate/type Modified Files: ArrayType.java BagType.java ListType.java MapType.java PersistentCollectionType.java SetType.java SortedMapType.java SortedSetType.java Log Message: standardised on dom4j fixed bugs in collection caching (sometimes an exception occurred) allowed null discriminators set autocommit to true in SchemaUpdate collections now deserialize correctly Index: ArrayType.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/type/ArrayType.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ArrayType.java 19 Jan 2003 11:47:08 -0000 1.5 --- ArrayType.java 9 Feb 2003 06:28:16 -0000 1.6 *************** *** 62,65 **** --- 62,74 ---- } + public PersistentCollection assembleCachedCollection( + SessionImplementor session, + CollectionPersister persister, + Serializable disassembled) + throws HibernateException, SQLException { + + return new ArrayHolder(session, persister, disassembled); + } + } Index: BagType.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/type/BagType.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** BagType.java 19 Jan 2003 11:47:08 -0000 1.5 --- BagType.java 9 Feb 2003 06:28:16 -0000 1.6 *************** *** 2,5 **** --- 2,8 ---- package net.sf.hibernate.type; + import java.io.Serializable; + import java.sql.SQLException; + import net.sf.hibernate.HibernateException; import net.sf.hibernate.collection.Bag; *************** *** 18,33 **** CollectionPersister persister) throws HibernateException { - return new Bag(session); - } - - public Class getReturnedClass() { - return java.util.Collection.class; - } ! public PersistentCollection wrap(SessionImplementor session, Object collection) { ! return new Bag( session, (java.util.Collection) collection ); ! } } --- 21,46 ---- CollectionPersister persister) throws HibernateException { ! return new Bag(session); ! } + public Class getReturnedClass() { + return java.util.Collection.class; } + + public PersistentCollection wrap(SessionImplementor session, Object collection) { + return new Bag( session, (java.util.Collection) collection ); + } + + public PersistentCollection assembleCachedCollection( + SessionImplementor session, + CollectionPersister persister, + Serializable disassembled) + throws HibernateException, SQLException { + + return new Bag(session, persister, disassembled); + } + + } Index: ListType.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/type/ListType.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ListType.java 19 Jan 2003 11:47:08 -0000 1.5 --- ListType.java 9 Feb 2003 06:28:16 -0000 1.6 *************** *** 2,5 **** --- 2,9 ---- package net.sf.hibernate.type; + import java.io.Serializable; + import java.sql.SQLException; + + import net.sf.hibernate.HibernateException; import net.sf.hibernate.collection.CollectionPersister; import net.sf.hibernate.collection.List; *************** *** 25,28 **** --- 29,41 ---- } + public PersistentCollection assembleCachedCollection( + SessionImplementor session, + CollectionPersister persister, + Serializable disassembled) + throws HibernateException, SQLException { + + return new List(session, persister, disassembled); + } + } Index: MapType.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/type/MapType.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MapType.java 19 Jan 2003 11:47:08 -0000 1.5 --- MapType.java 9 Feb 2003 06:28:16 -0000 1.6 *************** *** 2,7 **** --- 2,10 ---- package net.sf.hibernate.type; + import java.io.Serializable; + import java.sql.SQLException; import java.util.Iterator; + import net.sf.hibernate.HibernateException; import net.sf.hibernate.collection.CollectionPersister; import net.sf.hibernate.collection.Map; *************** *** 31,34 **** --- 34,47 ---- return new Map( session, (java.util.Map) collection ); } + + public PersistentCollection assembleCachedCollection( + SessionImplementor session, + CollectionPersister persister, + Serializable disassembled) + throws HibernateException, SQLException { + + return new Map(session, persister, disassembled); + } + } Index: PersistentCollectionType.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/type/PersistentCollectionType.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PersistentCollectionType.java 2 Feb 2003 04:19:52 -0000 1.6 --- PersistentCollectionType.java 9 Feb 2003 06:28:16 -0000 1.7 *************** *** 169,172 **** --- 169,177 ---- } + public abstract PersistentCollection assembleCachedCollection( + SessionImplementor session, + CollectionPersister persister, + Serializable disassembled) throws HibernateException, SQLException; + } Index: SetType.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/type/SetType.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SetType.java 19 Jan 2003 11:47:08 -0000 1.5 --- SetType.java 9 Feb 2003 06:28:16 -0000 1.6 *************** *** 2,5 **** --- 2,9 ---- package net.sf.hibernate.type; + import java.io.Serializable; + import java.sql.SQLException; + + import net.sf.hibernate.HibernateException; import net.sf.hibernate.collection.CollectionPersister; import net.sf.hibernate.collection.PersistentCollection; *************** *** 25,28 **** --- 29,40 ---- } + public PersistentCollection assembleCachedCollection( + SessionImplementor session, + CollectionPersister persister, + Serializable disassembled) throws HibernateException, SQLException { + + return new Set(session, persister, disassembled); + } + } Index: SortedMapType.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/type/SortedMapType.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SortedMapType.java 19 Jan 2003 11:47:08 -0000 1.5 --- SortedMapType.java 9 Feb 2003 06:28:16 -0000 1.6 *************** *** 3,8 **** --- 3,11 ---- package net.sf.hibernate.type; + import java.io.Serializable; + import java.sql.SQLException; import java.util.Comparator; + import net.sf.hibernate.HibernateException; import net.sf.hibernate.collection.CollectionPersister; import net.sf.hibernate.collection.PersistentCollection; *************** *** 33,36 **** --- 36,48 ---- } + public PersistentCollection assembleCachedCollection( + SessionImplementor session, + CollectionPersister persister, + Serializable disassembled) + throws HibernateException, SQLException { + + return new SortedMap(session, persister, comparator, disassembled); + } + } Index: SortedSetType.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/type/SortedSetType.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SortedSetType.java 19 Jan 2003 11:47:08 -0000 1.5 --- SortedSetType.java 9 Feb 2003 06:28:16 -0000 1.6 *************** *** 3,8 **** --- 3,11 ---- package net.sf.hibernate.type; + import java.io.Serializable; + import java.sql.SQLException; import java.util.Comparator; + import net.sf.hibernate.HibernateException; import net.sf.hibernate.collection.CollectionPersister; import net.sf.hibernate.collection.PersistentCollection; *************** *** 28,33 **** --- 31,45 ---- return java.util.SortedSet.class; } + public PersistentCollection wrap(SessionImplementor session, Object collection) { return new SortedSet( session, (java.util.SortedSet) collection ); + } + + public PersistentCollection assembleCachedCollection( + SessionImplementor session, + CollectionPersister persister, + Serializable disassembled) throws HibernateException, SQLException { + + return new SortedSet(session, persister, comparator, disassembled); } |