From: Michael D. <mik...@us...> - 2004-06-03 03:23:42
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25920 Modified Files: DoubleStringType.cs FooProxy.cs Fum.cs FumCompositeID.cs Glarch.cs Immutable.cs NHibernate.DomainModel-1.1.csproj Added Files: Fo.cs Holder.cs INamed.cs Inner.cs InnerKey.cs Log Message: More classes that are used by test have been added. Index: Immutable.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Immutable.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Immutable.cs 11 May 2004 19:44:58 -0000 1.1 --- Immutable.cs 3 Jun 2004 03:23:33 -0000 1.2 *************** *** 3,7 **** namespace NHibernate.DomainModel { - /// <summary> /// Summary description for Immutable. --- 3,6 ---- *************** *** 9,33 **** public class Immutable { ! ! private string foo; ! private string bar; ! private string id; public string Foo { ! get { return foo; } ! set { foo = value; } } public string Bar { ! get { return bar; } ! set { bar = value; } } public string Id { ! get { return id; } ! set { id = value; } } } --- 8,31 ---- public class Immutable { ! private string _foo; ! private string _bar; ! private string _id; public string Foo { ! get { return _foo; } ! set { _foo = value; } } public string Bar { ! get { return _bar; } ! set { _bar = value; } } public string Id { ! get { return _id; } ! set { _id = value; } } } Index: Glarch.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Glarch.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Glarch.cs 8 Apr 2004 15:04:30 -0000 1.2 --- Glarch.cs 3 Jun 2004 03:23:33 -0000 1.3 *************** *** 4,8 **** namespace NHibernate.DomainModel { ! public class Glarch : Super, GlarchProxy, ILifecycle { --- 4,8 ---- namespace NHibernate.DomainModel { ! //TODO: figure out what to do with this DynaBean public class Glarch : Super, GlarchProxy, ILifecycle { Index: FumCompositeID.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/FumCompositeID.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FumCompositeID.cs 9 Apr 2004 13:14:53 -0000 1.1 --- FumCompositeID.cs 3 Jun 2004 03:23:33 -0000 1.2 *************** *** 10,13 **** --- 10,14 ---- DateTime date_; short short_; + public override bool Equals(object obj) { *************** *** 15,18 **** --- 16,20 ---- return this.string_.Equals(that.string_) && this.short_==that.short_; } + public override int GetHashCode() { Index: NHibernate.DomainModel-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/NHibernate.DomainModel-1.1.csproj,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** NHibernate.DomainModel-1.1.csproj 2 Jun 2004 04:53:24 -0000 1.12 --- NHibernate.DomainModel-1.1.csproj 3 Jun 2004 03:23:33 -0000 1.13 *************** *** 272,275 **** --- 272,280 ---- /> <File + RelPath = "Fo.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Fo.hbm.xml" BuildAction = "EmbeddedResource" *************** *** 337,340 **** --- 342,350 ---- /> <File + RelPath = "Holder.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Holder.hbm.xml" BuildAction = "EmbeddedResource" *************** *** 350,353 **** --- 360,378 ---- /> <File + RelPath = "INamed.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "Inner.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "InnerKey.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "JoinedSubclass.hbm.xml" BuildAction = "EmbeddedResource" Index: Fum.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Fum.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Fum.cs 29 Apr 2004 15:15:59 -0000 1.2 --- Fum.cs 3 Jun 2004 03:23:33 -0000 1.3 *************** *** 10,14 **** private Fum _fo; private Qux[] _quxArray; ! private IDictionary _friends; private DateTime _lastUpdated; --- 10,14 ---- private Fum _fo; private Qux[] _quxArray; ! private IDictionary _friends; // <set> mapping private DateTime _lastUpdated; *************** *** 107,116 **** s.Delete(de.Key); } - - // IEnumerator iter = friends.GetEnumerator(); - // while ( iter.MoveNext() ) - // { - // s.Delete( iter.Current ); - // } } catch (Exception e) --- 107,110 ---- *************** *** 136,145 **** s.Save(de.Key); } - - // IEnumerator iter = friends.GetEnumerator(); - // while ( iter.MoveNext() ) - // { - // s.Save( iter.Current ); - // } } catch (Exception e) --- 130,133 ---- --- NEW FILE: Fo.cs --- using System; namespace NHibernate.DomainModel { public class Fo { public static Fo NewFo() { return new Fo(); } private Fo() {} private byte[] _buf; private object _serial; private long _version; private int _x; public byte[] Buf { get { return _buf; } set { _buf = value; } } public object Serial { get { return _serial; } set { _serial = value; } } public long Version { get { return _version; } set { _version = value; } } public int X { get { return _x; } set { _x = value; } } } } --- NEW FILE: Inner.cs --- using System; namespace NHibernate.DomainModel { /// <summary> /// Summary description for Inner. /// </summary> [Serializable] public class Inner { private InnerKey _id; private string _dudu; public InnerKey Id { get { return _id; } set { _id = value; } } public string Dudu { get { return _dudu; } set { _dudu = value; } } #region object members public override bool Equals(object obj) { if(this==obj) return true; Inner cidSuper = obj as Inner; if(cidSuper==null) return false; if(_id==null) { return cidSuper._id==null; } else { return _id.Equals(cidSuper._id); } } public override int GetHashCode() { if(_id==null) { return 0; } else { return _id.GetHashCode(); } } #endregion } } --- NEW FILE: Holder.cs --- using System; using System.Collections; namespace NHibernate.DomainModel { /// <summary> /// Summary description for Holder. /// </summary> public class Holder : INamed { private string _id; private IList _ones; private Foo[] _fooArray; private IDictionary _foos;// <set> mapping private string _name; public string Id { get { return _id; } set { _id = value; } } public IList Ones { get { return _ones; } set { _ones = value; } } public Foo[] FooArray { get { return _fooArray; } set { _fooArray = value; } } public IDictionary Foos { get { return _foos; } set { _foos = value; } } #region INamed Members public string Name { get { return _name; } set { _name = value; } } #endregion } } --- NEW FILE: INamed.cs --- using System; namespace NHibernate.DomainModel { public interface INamed { string Name { get; } } } --- NEW FILE: InnerKey.cs --- using System; namespace NHibernate.DomainModel { /// <summary> /// Summary description for InnerKey. /// </summary> [Serializable] public class InnerKey { private string _aKey; private string _bKey; public string AKey { get { return _aKey; } set { _aKey = value; } } public string BKey { get { return _bKey; } set { _bKey = value; } } #region object Members public override bool Equals(object obj) { if(this==obj) return true; InnerKey cidSuperID = obj as InnerKey; if(cidSuperID==null) return false; if (_aKey!=null ? !_aKey.Equals(cidSuperID._aKey) : cidSuperID._aKey!=null) return false; if (_bKey!=null ? !_bKey.Equals(cidSuperID._bKey) : cidSuperID._bKey!=null) return false; return true; } public override int GetHashCode() { unchecked { int result; //TODO: string won't be null - verify result = (_aKey!=null ? _aKey.GetHashCode() : 0); result = 29 * result + (_bKey!=null ? _bKey.GetHashCode() : 0); return result; } } #endregion } } Index: DoubleStringType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/DoubleStringType.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DoubleStringType.cs 8 Apr 2004 14:59:32 -0000 1.1 --- DoubleStringType.cs 3 Jun 2004 03:23:33 -0000 1.2 *************** *** 19,23 **** if (x==y) return true; if (x==null || y==null) return false; ! return ((String[]) x)[0].Equals( ((String[]) y)[0] ) && ((String[]) x)[1].Equals( ((String[]) y)[1] ); } --- 19,26 ---- if (x==y) return true; if (x==null || y==null) return false; ! string[] lhs = (string[])x; ! string[] rhs = (string[])y; ! ! return lhs[0].Equals(rhs[0]) && lhs[1].Equals(rhs[1]); } *************** *** 34,41 **** public bool IsMutable { ! get ! { ! return true; ! } } --- 37,41 ---- public bool IsMutable { ! get { return true; } } Index: FooProxy.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/FooProxy.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FooProxy.cs 8 Apr 2004 14:59:32 -0000 1.1 --- FooProxy.cs 3 Jun 2004 03:23:33 -0000 1.2 *************** *** 4,7 **** --- 4,8 ---- { + //TODO: fix up these property names for .net standards public interface FooProxy { |