From: Sergey K. <jus...@us...> - 2005-04-09 12:51:15
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7576/src/NHibernate/Collection Modified Files: ArrayHolder.cs Bag.cs IdentifierBag.cs List.cs Map.cs PersistentCollection.cs Set.cs SortedMap.cs SortedSet.cs Log Message: Modified collection snapshots to be ICollections instead of objects (not so generic, but all of them are ICollections anyway). Fixed a bug in Set.InitializeFromCache Index: Map.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/Map.cs,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Map.cs 30 Mar 2005 16:28:24 -0000 1.23 --- Map.cs 9 Apr 2005 12:51:06 -0000 1.24 *************** *** 23,27 **** /// <param name="persister"></param> /// <returns></returns> ! protected override object Snapshot( ICollectionPersister persister ) { Hashtable clonedMap = new Hashtable( map.Count ); --- 23,27 ---- /// <param name="persister"></param> /// <returns></returns> ! protected override ICollection Snapshot( ICollectionPersister persister ) { Hashtable clonedMap = new Hashtable( map.Count ); Index: PersistentCollection.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/PersistentCollection.cs,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** PersistentCollection.cs 29 Mar 2005 05:33:15 -0000 1.25 --- PersistentCollection.cs 9 Apr 2005 12:51:06 -0000 1.26 *************** *** 437,441 **** /// <param name="persister"></param> /// <returns></returns> ! protected abstract object Snapshot( ICollectionPersister persister ); /// <summary> --- 437,441 ---- /// <param name="persister"></param> /// <returns></returns> ! protected abstract ICollection Snapshot( ICollectionPersister persister ); /// <summary> *************** *** 466,470 **** /// <param name="persister"></param> /// <returns></returns> ! public object GetSnapshot( ICollectionPersister persister ) { return ( persister == null ) ? null : Snapshot( persister ); --- 466,470 ---- /// <param name="persister"></param> /// <returns></returns> ! public ICollection GetSnapshot( ICollectionPersister persister ) { return ( persister == null ) ? null : Snapshot( persister ); Index: List.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/List.cs,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** List.cs 14 Mar 2005 18:51:48 -0000 1.21 --- List.cs 9 Apr 2005 12:51:06 -0000 1.22 *************** *** 20,24 **** /// <param name="persister"></param> /// <returns></returns> ! protected override object Snapshot( ICollectionPersister persister ) { ArrayList clonedList = new ArrayList( list.Count ); --- 20,24 ---- /// <param name="persister"></param> /// <returns></returns> ! protected override ICollection Snapshot( ICollectionPersister persister ) { ArrayList clonedList = new ArrayList( list.Count ); Index: Bag.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/Bag.cs,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Bag.cs 14 Mar 2005 18:51:48 -0000 1.16 --- Bag.cs 9 Apr 2005 12:51:06 -0000 1.17 *************** *** 168,172 **** /// <param name="persister"></param> /// <returns></returns> ! protected override object Snapshot( ICollectionPersister persister ) { ArrayList clonedList = new ArrayList( bag.Count ); --- 168,172 ---- /// <param name="persister"></param> /// <returns></returns> ! protected override ICollection Snapshot( ICollectionPersister persister ) { ArrayList clonedList = new ArrayList( bag.Count ); Index: ArrayHolder.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/ArrayHolder.cs,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** ArrayHolder.cs 14 Mar 2005 18:51:48 -0000 1.19 --- ArrayHolder.cs 9 Apr 2005 12:51:06 -0000 1.20 *************** *** 48,52 **** /// <param name="persister"></param> /// <returns></returns> ! protected override object Snapshot( ICollectionPersister persister ) { int length = /*(array==null) ? temp.Count :*/ array.Length; --- 48,52 ---- /// <param name="persister"></param> /// <returns></returns> ! protected override ICollection Snapshot( ICollectionPersister persister ) { int length = /*(array==null) ? temp.Count :*/ array.Length; Index: SortedSet.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/SortedSet.cs,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** SortedSet.cs 1 Mar 2005 16:24:44 -0000 1.15 --- SortedSet.cs 9 Apr 2005 12:51:06 -0000 1.16 *************** *** 23,27 **** /// <param name="persister"></param> /// <returns></returns> ! protected override object Snapshot( ICollectionPersister persister ) { SortedList clonedSet = new SortedList( comparer, internalSet.Count ); --- 23,27 ---- /// <param name="persister"></param> /// <returns></returns> ! protected override ICollection Snapshot( ICollectionPersister persister ) { SortedList clonedSet = new SortedList( comparer, internalSet.Count ); Index: SortedMap.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/SortedMap.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** SortedMap.cs 1 Mar 2005 16:24:44 -0000 1.10 --- SortedMap.cs 9 Apr 2005 12:51:06 -0000 1.11 *************** *** 26,30 **** /// <param name="persister"></param> /// <returns></returns> ! protected override object Snapshot( ICollectionPersister persister ) { SortedList clonedMap = new SortedList( comparer ); --- 26,30 ---- /// <param name="persister"></param> /// <returns></returns> ! protected override ICollection Snapshot( ICollectionPersister persister ) { SortedList clonedMap = new SortedList( comparer ); Index: Set.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/Set.cs,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** Set.cs 29 Mar 2005 05:33:15 -0000 1.28 --- Set.cs 9 Apr 2005 12:51:06 -0000 1.29 *************** *** 10,14 **** /// <summary> /// .NET has no design equivalent for Java's Set so we are going to use the ! /// Iesi.Collections library. /// </summary> /// <remarks> --- 10,15 ---- /// <summary> /// .NET has no design equivalent for Java's Set so we are going to use the ! /// Iesi.Collections library. This class is internal to NHibernate and shouldn't ! /// be used by user code. /// </summary> /// <remarks> *************** *** 43,47 **** /// </summary> /// <param name="persister"></param> ! protected override object Snapshot( ICollectionPersister persister ) { Hashtable clonedMap = new Hashtable( internalSet.Count ); --- 44,48 ---- /// </summary> /// <param name="persister"></param> ! protected override ICollection Snapshot( ICollectionPersister persister ) { Hashtable clonedMap = new Hashtable( internalSet.Count ); *************** *** 109,116 **** /// <summary> ! /// /// </summary> /// <param name="session"></param> ! internal Set( ISessionImplementor session ) : base( session ) { } --- 110,117 ---- /// <summary> ! /// This constructor is NOT meant to be called from user code. /// </summary> /// <param name="session"></param> ! public Set( ISessionImplementor session ) : base( session ) { } *************** *** 118,121 **** --- 119,123 ---- /// <summary> /// Creates a new Set initialized to the values in the Map. + /// This constructor is NOT meant to be called from user code. /// </summary> /// <param name="session"></param> *************** *** 124,128 **** /// Only call this constructor if you consider the map initialized. /// </remarks> ! internal Set( ISessionImplementor session, ISet collection ) : base( session ) { internalSet = collection; --- 126,130 ---- /// Only call this constructor if you consider the map initialized. /// </remarks> ! public Set( ISessionImplementor session, ISet collection ) : base( session ) { internalSet = collection; *************** *** 141,145 **** BeforeInitialize( persister ); object[ ] array = ( object[ ] ) disassembled; ! for( int i = 0; i < array.Length; i += 2 ) { internalSet.Add( persister.ElementType.Assemble( array[ i ], Session, owner ) ); --- 143,147 ---- BeforeInitialize( persister ); object[ ] array = ( object[ ] ) disassembled; ! for( int i = 0; i < array.Length; i++ ) { internalSet.Add( persister.ElementType.Assemble( array[ i ], Session, owner ) ); Index: IdentifierBag.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/IdentifierBag.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** IdentifierBag.cs 14 Mar 2005 18:51:48 -0000 1.11 --- IdentifierBag.cs 9 Apr 2005 12:51:06 -0000 1.12 *************** *** 430,434 **** /// <param name="persister"></param> /// <returns></returns> ! protected override object Snapshot( ICollectionPersister persister ) { IDictionary map = new Hashtable( values.Count ); --- 430,434 ---- /// <param name="persister"></param> /// <returns></returns> ! protected override ICollection Snapshot( ICollectionPersister persister ) { IDictionary map = new Hashtable( values.Count ); |