From: Michael D. <mik...@us...> - 2004-11-28 21:47:56
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Engine In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3188/src/NHibernate/Engine Modified Files: ISessionImplementor.cs RowSelection.cs Versioning.cs Log Message: Added some comments about how the ScheduledActions and Versioning are working. Index: Versioning.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Engine/Versioning.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Versioning.cs 19 Oct 2004 02:24:08 -0000 1.4 --- Versioning.cs 28 Nov 2004 21:47:46 -0000 1.5 *************** *** 16,22 **** /// Increment the given version number /// </summary> ! /// <param name="version"></param> ! /// <param name="versionType"></param> ! /// <returns></returns> public static object Increment(object version, IVersionType versionType) { --- 16,22 ---- /// Increment the given version number /// </summary> ! /// <param name="version">The value of the current version.</param> ! /// <param name="versionType">The <see cref="IVersionType"/> of the versioned property.</param> ! /// <returns>Returns the next value for the version.</returns> public static object Increment(object version, IVersionType versionType) { *************** *** 29,34 **** /// Create an initial version number /// </summary> ! /// <param name="versionType"></param> ! /// <returns></returns> public static object Seed(IVersionType versionType) { --- 29,34 ---- /// Create an initial version number /// </summary> ! /// <param name="versionType">The <see cref="IVersionType"/> of the versioned property.</param> ! /// <returns>A seed value to initialize the versioned property with.</returns> public static object Seed(IVersionType versionType) { *************** *** 41,48 **** /// Seed the given instance state snapshot with an initial version number /// </summary> ! /// <param name="fields"></param> ! /// <param name="versionProperty"></param> ! /// <param name="versionType"></param> ! /// <returns></returns> public static bool SeedVersion(object[] fields, int versionProperty, IVersionType versionType) { --- 41,48 ---- /// Seed the given instance state snapshot with an initial version number /// </summary> ! /// <param name="fields">An array of objects that contains a snapshot of a persistent object.</param> ! /// <param name="versionProperty">The index of the version property in the <c>fields</c> parameter.</param> ! /// <param name="versionType">The <see cref="IVersionType"/> of the versioned property.</param> ! /// <returns><c>true</c> if the version property needs to be seeded with an initial value.</returns> public static bool SeedVersion(object[] fields, int versionProperty, IVersionType versionType) { *************** *** 58,61 **** --- 58,68 ---- } + /// <summary> + /// Gets the value of the version. + /// </summary> + /// <param name="fields">An array of objects that contains a snapshot of a persistent object.</param> + /// <param name="versionProperty">The index of the version property in the <c>fields</c> parameter.</param> + /// <param name="versionType">The <see cref="IVersionType"/> of the versioned property.</param> + /// <returns>The value of the version.</returns> private static object GetVersion(object[] fields, int versionProperty, IVersionType versionType) { *************** *** 63,66 **** --- 70,80 ---- } + /// <summary> + /// Sets the value of the version. + /// </summary> + /// <param name="fields">An array of objects that contains a snapshot of a persistent object.</param> + /// <param name="version">The value the version should be set to in the <c>fields</c> parameter.</param> + /// <param name="versionProperty">The index of the version property in the <c>fields</c> parameter.</param> + /// <param name="versionType">The <see cref="IVersionType"/> of the versioned property.</param> private static void SetVersion(object[] fields, object version, int versionProperty, IVersionType versionType) { *************** *** 71,77 **** /// Set the version number of the given instance state snapshot /// </summary> ! /// <param name="fields"></param> ! /// <param name="version"></param> ! /// <param name="persister"></param> public static void SetVersion(object[] fields, object version, IClassPersister persister) { --- 85,91 ---- /// Set the version number of the given instance state snapshot /// </summary> ! /// <param name="fields">An array of objects that contains a snapshot of a persistent object.</param> ! /// <param name="version">The value the version should be set to in the <c>fields</c> parameter.</param> ! /// <param name="persister">The <see cref="IClassPersister"/> that is responsible for persisting the values of the <c>fields</c> parameter.</param> public static void SetVersion(object[] fields, object version, IClassPersister persister) { *************** *** 82,88 **** /// Get the version number of the given instance state snapshot /// </summary> ! /// <param name="fields"></param> ! /// <param name="persister"></param> ! /// <returns></returns> public static object GetVersion(object[] fields, IClassPersister persister) { --- 96,105 ---- /// Get the version number of the given instance state snapshot /// </summary> ! /// <param name="fields">An array of objects that contains a snapshot of a persistent object.</param> ! /// <param name="persister">The <see cref="IClassPersister"/> that is responsible for persisting the values of the <c>fields</c> parameter.</param> ! /// <returns> ! /// The value of the version contained in the <c>fields</c> parameter or null if the ! /// Entity is not versioned. ! /// </returns> public static object GetVersion(object[] fields, IClassPersister persister) { Index: ISessionImplementor.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Engine/ISessionImplementor.cs,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** ISessionImplementor.cs 31 Oct 2004 04:30:59 -0000 1.23 --- ISessionImplementor.cs 28 Nov 2004 21:47:46 -0000 1.24 *************** *** 175,181 **** /// After actually updating a row, record the fact that the database state has been update. /// </summary> ! /// <param name="obj"></param> ! /// <param name="updatedState"></param> ! /// <param name="nextVersion"></param> void PostUpdate(object obj, object[] updatedState, object nextVersion); --- 175,181 ---- /// After actually updating a row, record the fact that the database state has been update. /// </summary> ! /// <param name="obj">The <see cref="object"/> instance that was saved.</param> ! /// <param name="updatedState">A updated snapshot of the values in the object.</param> ! /// <param name="nextVersion">The new version to assign to the <c>obj</c>.</param> void PostUpdate(object obj, object[] updatedState, object nextVersion); Index: RowSelection.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Engine/RowSelection.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RowSelection.cs 2 Sep 2004 04:00:42 -0000 1.2 --- RowSelection.cs 28 Nov 2004 21:47:46 -0000 1.3 *************** *** 12,16 **** /// Indicates that the no value has been set on the Property. /// </summary> ! public static int NoValue = -1; private int firstRow = 0; --- 12,16 ---- /// Indicates that the no value has been set on the Property. /// </summary> ! public static readonly int NoValue = -1; private int firstRow = 0; |