From: Michael D. <mik...@us...> - 2004-12-09 17:53:26
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Id In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18805/NHibernate/Id Modified Files: IdentityGenerator.cs IIdentifierGenerator.cs Log Message: Some comments added. Index: IIdentifierGenerator.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Id/IIdentifierGenerator.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IIdentifierGenerator.cs 28 Mar 2004 06:06:40 -0000 1.2 --- IIdentifierGenerator.cs 9 Dec 2004 17:53:14 -0000 1.3 *************** *** 7,11 **** /// <summary> /// The general contract between a class that generates unique ! /// identifiers and the <c>ISession</c>. /// </summary> /// <remarks> --- 7,11 ---- /// <summary> /// The general contract between a class that generates unique ! /// identifiers and the <see cref="ISession"/>. /// </summary> /// <remarks> *************** *** 32,36 **** /// Generate a new identifier /// </summary> ! /// <param name="session"></param> /// <param name="obj">The entity for which the id is being generate</param> /// <returns>The new identifier</returns> --- 32,36 ---- /// Generate a new identifier /// </summary> ! /// <param name="session">The <see cref="ISessionImplementor"/> this id is being generated in.</param> /// <param name="obj">The entity for which the id is being generate</param> /// <returns>The new identifier</returns> Index: IdentityGenerator.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Id/IdentityGenerator.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IdentityGenerator.cs 22 Apr 2003 23:47:34 -0000 1.2 --- IdentityGenerator.cs 9 Dec 2004 17:53:14 -0000 1.3 *************** *** 2,23 **** using NHibernate.Engine; ! namespace NHibernate.Id { /// <summary> ! /// The general contract between a class that generates unique ! /// identifiers and the <c>Session</c>. It is not intended that ! /// this interface ever be exposed to the application. It <b>is</b> ! /// intended that users implement this interface to provide ! /// custom identifier generation strategies. ! /// ! /// Implementors should provide a public default constructor. ! /// ! /// Implementations that accept configuration parameters should ! /// also implement <c>Configurable</c>. ! /// ! /// Implementors MUST be threadsafe. /// </summary> ! public class IdentityGenerator : IIdentifierGenerator { ! ! public object Generate(ISessionImplementor s, object obj) { return null; } --- 2,36 ---- using NHibernate.Engine; ! namespace NHibernate.Id ! { /// <summary> ! /// Indicates to the <see cref="ISession"/> that identity ! /// (ie. identity/autoincrement column) key generation should be used. /// </summary> ! /// <remarks> ! /// <para> ! /// This id generation strategy is specified in the mapping file as ! /// <c><generator class="identity"></c> ! /// </para> ! /// <para> ! /// This indicates to NHibernate that the database generates the id when ! /// the entity is inserted. ! /// </para> ! /// </remarks> ! public class IdentityGenerator : IIdentifierGenerator ! { ! /// <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; } |