From: Michael D. <mik...@us...> - 2004-07-06 04:32:58
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11388/NHibernate.DomainModel Modified Files: Qux.cs Qux.hbm.xml Log Message: Fixed properties to use .net naming conventions. Index: Qux.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Qux.hbm.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Qux.hbm.xml 29 Jun 2004 14:26:27 -0000 1.4 --- Qux.hbm.xml 6 Jul 2004 04:32:49 -0000 1.5 *************** *** 1,18 **** <?xml version="1.0" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> ! <class name="NHibernate.DomainModel.Qux, NHibernate.DomainModel" table="quux" proxy="NHibernate.DomainModel.Qux, NHibernate.DomainModel"> <id name="Key" column="qux_key" unsaved-value="0"> <generator class="hilo" /> </id> ! <many-to-one name="Foo" class="NHibernate.DomainModel.Foo, NHibernate.DomainModel"> <column name="foo" length="36" /> </many-to-one> ! <property name="deleted" /> ! <property name="loaded" /> ! <property name="stored" /> ! <property name="created" /> ! <property name="childKey" type="Int64" /> ! <property name="stuff" /> ! <set name="fums" lazy="true"> <key column="qux_id" /> <many-to-many class="NHibernate.DomainModel.Fum, NHibernate.DomainModel"> --- 1,26 ---- <?xml version="1.0" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> ! <class ! name="NHibernate.DomainModel.Qux, NHibernate.DomainModel" ! table="quux" ! proxy="NHibernate.DomainModel.Qux, NHibernate.DomainModel" ! > <id name="Key" column="qux_key" unsaved-value="0"> <generator class="hilo" /> </id> ! <many-to-one ! name="Foo" ! class="NHibernate.DomainModel.Foo, NHibernate.DomainModel" ! > <column name="foo" length="36" /> </many-to-one> ! ! <property name="Deleted" /> ! <property name="Loaded" /> ! <property name="Stored" /> ! <property name="Created" /> ! <property name="ChildKey" type="Int64" /> ! <property name="Stuff" /> ! <set name="Fums" lazy="true"> <key column="qux_id" /> <many-to-many class="NHibernate.DomainModel.Fum, NHibernate.DomainModel"> *************** *** 22,29 **** </many-to-many> </set> ! <list name="moreFums" lazy="true"> <key column="qux_id" /> <index column="posn" /> ! <one-to-many class="NHibernate.DomainModel.Fum, NHibernate.DomainModel" /> </list> </class> --- 30,39 ---- </many-to-many> </set> ! <list name="MoreFums" lazy="true"> <key column="qux_id" /> <index column="posn" /> ! <one-to-many ! class="NHibernate.DomainModel.Fum, NHibernate.DomainModel" ! /> </list> </class> Index: Qux.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Qux.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Qux.cs 29 Jun 2004 14:26:27 -0000 1.3 --- Qux.cs 6 Jul 2004 04:32:49 -0000 1.4 *************** *** 4,18 **** namespace NHibernate.DomainModel { - //TODO: fix up property names public class Qux : ILifecycle { ! ! private ISession session; ! public Qux() { } public Qux(String s) { ! stuff=s; } --- 4,29 ---- namespace NHibernate.DomainModel { public class Qux : ILifecycle { ! private ISession _session; ! private long _key; ! ! private FooProxy _foo; ! private bool _created; ! private bool _deleted; ! private bool _loaded; ! private bool _stored; ! private string _stuff; ! // <set> ! private IDictionary _fums; ! private IList _moreFums; ! private Qux _child; ! private long _childKey; ! public Qux() { } public Qux(String s) { ! _stuff=s; } *************** *** 21,25 **** public LifecycleVeto OnSave(ISession session) { ! created=true; try { --- 32,36 ---- public LifecycleVeto OnSave(ISession session) { ! _created=true; try { *************** *** 37,41 **** public LifecycleVeto OnDelete(ISession session) { ! deleted=true; try { --- 48,52 ---- public LifecycleVeto OnDelete(ISession session) { ! _deleted = true; try { *************** *** 52,57 **** public void OnLoad(ISession session, object id) { ! loaded=true; ! this.session=session; } --- 63,68 ---- public void OnLoad(ISession session, object id) { ! _loaded = true; ! _session = session; } *************** *** 63,76 **** #endregion ! public void store() { } /// <summary> - /// Holds the _foo - /// </summary> - private FooProxy _foo; - - /// <summary> /// Gets or sets the _foo /// </summary> --- 74,82 ---- #endregion ! public void Store() { } /// <summary> /// Gets or sets the _foo /// </summary> *************** *** 82,167 **** /// <summary> - /// Holds the _created - /// </summary> - private bool _created; - - /// <summary> /// Gets or sets the _created /// </summary> ! public bool created { ! get ! { ! return _created; ! } ! set ! { ! _created = value; ! } } ! /// <summary> ! /// Holds the _deleted ! /// </summary> ! private bool _deleted; ! /// <summary> /// Gets or sets the _deleted /// </summary> ! public bool deleted { ! get ! { ! return _deleted; ! } ! set ! { ! _deleted = value; ! } } /// <summary> - /// Holds the _loaded - /// </summary> - private bool _loaded; - - /// <summary> /// Gets or sets the _loaded /// </summary> ! public bool loaded { ! get ! { ! return _loaded; ! } ! set ! { ! _loaded = value; ! } } /// <summary> - /// Holds the _stored - /// </summary> - private bool _stored; - - /// <summary> /// Gets or sets the _stored /// </summary> ! public bool stored { ! get ! { ! return _stored; ! } ! set ! { ! _stored = value; ! } } ! /// <summary> ! /// Holds the _key ! /// </summary> ! private long _key; ! /// <summary> /// Gets or sets the _key --- 88,126 ---- /// <summary> /// Gets or sets the _created /// </summary> ! public bool Created { ! get { return _created; } ! set { _created = value; } } ! /// <summary> /// Gets or sets the _deleted /// </summary> ! public bool Deleted { ! get { return _deleted; } ! set { _deleted = value; } } /// <summary> /// Gets or sets the _loaded /// </summary> ! public bool Loaded { ! get { return _loaded; } ! set { _loaded = value; } } /// <summary> /// Gets or sets the _stored /// </summary> ! public bool Stored { ! get { return _stored; } ! set { _stored = value; } } ! /// <summary> /// Gets or sets the _key *************** *** 173,282 **** } - public long TheKey { ! set ! { ! _key = value; ! } } /// <summary> - /// Holds the _stuff - /// </summary> - private string _stuff; - - /// <summary> /// Gets or sets the _stuff /// </summary> ! public string stuff { ! get ! { ! return _stuff; ! } ! set ! { ! _stuff = value; ! } } /// <summary> ! /// Holds the _fums ! /// </summary> ! private IDictionary _fums; ! ! /// <summary> ! /// Gets or sets the _fums /// </summary> ! public IDictionary fums { ! get ! { ! return _fums; ! } ! set ! { ! _fums = value; ! } } ! ! /// <summary> ! /// Holds the _moreFums ! /// </summary> ! private IList _moreFums; ! /// <summary> /// Gets or sets the _moreFums /// </summary> ! public IList moreFums { ! get ! { ! return _moreFums; ! } ! set ! { ! _moreFums = value; ! } } ! private Qux _child; ! public Qux child { get { ! stored=true; ! this.childKey = child==null ? 0 : child.Key; ! if (childKey!=0 && child==null) child = (Qux) session.Load(typeof(Qux), childKey); return _child; } ! set ! { ! this._child = value; ! } } /// <summary> - /// Holds the _childKey - /// </summary> - private long _childKey; - - /// <summary> /// Gets or sets the _childKey /// </summary> ! public long childKey { ! get ! { ! return _childKey; ! } ! set ! { ! _childKey = value; ! } } - - } } \ No newline at end of file --- 132,187 ---- } public long TheKey { ! set { _key = value; } } /// <summary> /// Gets or sets the _stuff /// </summary> ! public string Stuff { ! get { return _stuff; } ! set { _stuff = value; } } /// <summary> ! /// Gets or sets the _fums (<set>) /// </summary> ! public IDictionary Fums { ! get { return _fums; } ! set { _fums = value; } } ! /// <summary> /// Gets or sets the _moreFums /// </summary> ! public IList MoreFums { ! get { return _moreFums; } ! set { _moreFums = value; } } ! public Qux Child { get { ! _stored=true; ! _childKey = _child==null ? 0 : _child.Key; ! if (_childKey!=0 && _child==null) _child = (Qux) _session.Load(typeof(Qux), _childKey); return _child; } ! set { _child = value; } } /// <summary> /// Gets or sets the _childKey /// </summary> ! public long ChildKey { ! get { return _childKey; } ! set { _childKey = value; } } } } \ No newline at end of file |