Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Id
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21577/nhibernate/src/NHibernate/Id
Modified Files:
IdentifierGeneratorFactory.cs IdentityGenerator.cs
Log Message:
Refactored SessionImpl as per 2.1 for Save/Update
Index: IdentifierGeneratorFactory.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Id/IdentifierGeneratorFactory.cs,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** IdentifierGeneratorFactory.cs 15 Jan 2005 21:16:13 -0000 1.14
--- IdentifierGeneratorFactory.cs 6 Mar 2005 12:44:42 -0000 1.15
***************
*** 111,115 ****
/// <see cref="String.Empty">String.Empty</see>
/// </value>
! public static readonly string ShortCircuitIndicator = String.Empty;
/// <summary>
--- 111,120 ----
/// <see cref="String.Empty">String.Empty</see>
/// </value>
! public static readonly object ShortCircuitIndicator = new object();
!
! /// <summary>
! /// When this is return
! /// </summary>
! public static readonly object IdentityColumnIndicator = new object();
/// <summary>
Index: IdentityGenerator.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Id/IdentityGenerator.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** IdentityGenerator.cs 15 Jan 2005 21:16:13 -0000 1.5
--- IdentityGenerator.cs 6 Mar 2005 12:44:42 -0000 1.6
***************
*** 24,40 ****
/// <summary>
! /// This class can not generate the <c>id</c>. It has to get the
! /// value from the database.
/// </summary>
/// <param name="s">The <see cref="ISessionImplementor"/> this id is being generated in.</param>
/// <param name="obj">The entity the id is being generated for.</param>
/// <returns>
! /// <c>null</c> because this <see cref="IIdentifierGenerator"/> can not generate
! /// an id. The entity must be inserted into the database to get the database
! /// generated id.
/// </returns>
public object Generate( ISessionImplementor s, object obj )
{
! return null;
}
--- 24,39 ----
/// <summary>
! /// The IdentityGenerator for autoincrement/identity key generation.
! ///
/// </summary>
/// <param name="s">The <see cref="ISessionImplementor"/> this id is being generated in.</param>
/// <param name="obj">The entity the id is being generated for.</param>
/// <returns>
! /// <c>IdentityColumnIndicator</c> Indicates to the Session that identity (i.e. identity/autoincrement column)
! /// key generation should be used.
/// </returns>
public object Generate( ISessionImplementor s, object obj )
{
! return IdentifierGeneratorFactory.IdentityColumnIndicator;
}
|