From: Michael D. <mik...@us...> - 2005-01-02 22:03:51
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Mapping In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12379/NHibernate/Mapping Modified Files: Column.cs Constraint.cs ForeignKey.cs Formula.cs Index.cs IRelationalModel.cs PersistentClass.cs PrimaryKey.cs Table.cs UniqueKey.cs Log Message: Added some xml comments. Index: PersistentClass.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Mapping/PersistentClass.cs,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** PersistentClass.cs 31 Dec 2004 21:27:42 -0000 1.15 --- PersistentClass.cs 2 Jan 2005 22:03:39 -0000 1.16 *************** *** 7,12 **** { /// <summary> ! /// Base class for the <see cref="RootClass" /> mapped by <class> and a ! /// <see cref="Subclass"/> that is mapped by <subclass> or <joined-subclass> /// </summary> public abstract class PersistentClass --- 7,13 ---- { /// <summary> ! /// Base class for the <see cref="RootClass" /> mapped by <c><class></c> and a ! /// <see cref="Subclass"/> that is mapped by <c><subclass></c> or ! /// <c><joined-subclass></c>. /// </summary> public abstract class PersistentClass *************** *** 58,62 **** /// </value> /// <remarks> ! /// The value of this is set by the <c>discriminator-value</c> attribute. Each <subclass> /// in a heirarchy must define a unique <c>discriminator-value</c>. The default value /// is the class name if no value is supplied. --- 59,63 ---- /// </value> /// <remarks> ! /// The value of this is set by the <c>discriminator-value</c> attribute. Each <c><subclass></c> /// in a heirarchy must define a unique <c>discriminator-value</c>. The default value /// is the class name if no value is supplied. *************** *** 69,75 **** /// <summary> ! /// /// </summary> ! /// <param name="subclass"></param> public virtual void AddSubclass( Subclass subclass ) { --- 70,76 ---- /// <summary> ! /// Adds a <see cref="Subclass"/> to the class hierarchy. /// </summary> ! /// <param name="subclass">The <see cref="Subclass"/> to add to the hierarchy.</param> public virtual void AddSubclass( Subclass subclass ) { *************** *** 77,81 **** } ! /// <summary></summary> public virtual bool HasSubclasses { --- 78,85 ---- } ! /// <summary> ! /// Gets a boolean indicating if this PersistentClass has any subclasses. ! /// </summary> ! /// <value><c>true</c> if this PeristentClass has any subclasses.</value> public virtual bool HasSubclasses { *************** *** 83,87 **** } ! /// <summary></summary> public virtual int SubclassSpan { --- 87,94 ---- } ! /// <summary> ! /// Gets the number of subclasses that inherit either directly or indirectly. ! /// </summary> ! /// <value>The number of subclasses that inherit from this PersistentClass.</value> public virtual int SubclassSpan { *************** *** 100,107 **** /// Gets the Collection of Subclasses for this PersistentClass. /// </summary> ! /// <remarks> /// It will recursively go through Subclasses so that if a Subclass has Subclasses /// it will pick those up also. ! /// </remarks> public virtual ICollection SubclassCollection { --- 107,114 ---- /// Gets the Collection of Subclasses for this PersistentClass. /// </summary> ! /// <value> /// It will recursively go through Subclasses so that if a Subclass has Subclasses /// it will pick those up also. ! /// </value> public virtual ICollection SubclassCollection { *************** *** 125,129 **** } ! /// <summary></summary> public virtual ICollection DirectSubclasses { --- 132,143 ---- } ! /// <summary> ! /// Gets an <see cref="ICollection"/> of <see cref="Subclass"/> objects ! /// that directly inherit from this PersistentClass. ! /// </summary> ! /// <value> ! /// An <see cref="ICollection"/> of <see cref="Subclass"/> objects ! /// that directly inherit from this PersistentClass. ! /// </value> public virtual ICollection DirectSubclasses { *************** *** 132,138 **** /// <summary> ! /// /// </summary> ! /// <param name="p"></param> public virtual void AddProperty( Property p ) { --- 146,152 ---- /// <summary> ! /// Add the <see cref="Property"/> to this PersistentClass. /// </summary> ! /// <param name="p">The <see cref="Property"/> to add.</param> public virtual void AddProperty( Property p ) { *************** *** 153,157 **** } ! /// <summary></summary> public virtual ICollection PropertyCollection { --- 167,176 ---- } ! /// <summary> ! /// Gets an <see cref="ICollection"/> of <see cref="Property"/> objects. ! /// </summary> ! /// <value> ! /// An <see cref="ICollection"/> of <see cref="Property"/> objects. ! /// </value> public virtual ICollection PropertyCollection { *************** *** 159,163 **** } ! /// <summary></summary> public virtual System.Type PersistentClazz { --- 178,189 ---- } ! /// <summary> ! /// Gets the <see cref="System.Type"/> that is being mapped. ! /// </summary> ! /// <value>The <see cref="System.Type"/> that is being mapped.</value> ! /// <remarks> ! /// The value of this is set by the <c>name</c> attribute on the <c><class></c> ! /// element. ! /// </remarks> public virtual System.Type PersistentClazz { *************** *** 166,170 **** } ! /// <summary></summary> public virtual string Name { --- 192,199 ---- } ! /// <summary> ! /// Gets the fully qualified name of the type being persisted. ! /// </summary> ! /// <value>The fully qualified name of the type being persisted.</value> public virtual string Name { *************** *** 172,191 **** } ! /// <summary></summary> public abstract bool IsMutable { get; set; } ! /// <summary></summary> public abstract bool HasIdentifierProperty { get; } ! /// <summary></summary> public abstract Property IdentifierProperty { get; set; } ! /// <summary></summary> public abstract Value Identifier { get; set; } ! /// <summary></summary> public abstract Property Version { get; set; } ! /// <summary></summary> public abstract Value Discriminator { get; set; } --- 201,246 ---- } ! /// <summary> ! /// When implemented by a class, gets or set a boolean indicating ! /// if the PersistentClass has properties that can be changed. ! /// </summary> ! /// <value><c>true</c> if the object is mutable.</value> public abstract bool IsMutable { get; set; } ! /// <summary> ! /// When implemented by a class, gets a boolean indicating ! /// if the PersistentClass has a Property for the <c>id</c>. ! /// </summary> ! /// <value><c>true</c> if there is a Property for the <c>id</c>.</value> public abstract bool HasIdentifierProperty { get; } ! /// <summary> ! /// When implemented by a class, gets the <see cref="Property"/> ! /// that is used as the <c>id</c>. ! /// </summary> ! /// <value> ! /// The <see cref="Property"/> that is used as the <c>id</c>. ! /// </value> public abstract Property IdentifierProperty { get; set; } ! /// <summary> ! /// When implemented by a class, gets or sets the <see cref="Value"/> ! /// that contains information about the identifier. ! /// </summary> ! /// <value>The <see cref="Value"/> that contains information about the identifier.</value> public abstract Value Identifier { get; set; } ! /// <summary> ! /// When implemented by a class, gets or sets the <see cref="Property"/> ! /// that is used as the version. ! /// </summary> ! /// <value>The <see cref="Property"/> that is used as the version.</value> public abstract Property Version { get; set; } ! /// <summary> ! /// When implemented by a class, gets or sets the <see cref="Value"/> ! /// that contains information about the discriminator. ! /// </summary> ! /// <value>The <see cref="Value"/> that contains information about the discriminator.</value> public abstract Value Discriminator { get; set; } Index: IRelationalModel.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Mapping/IRelationalModel.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** IRelationalModel.cs 31 Dec 2004 21:27:02 -0000 1.3 --- IRelationalModel.cs 2 Jan 2005 22:03:39 -0000 1.4 *************** *** 3,22 **** namespace NHibernate.Mapping { ! /// <summary></summary> public interface IRelationalModel { /// <summary> ! /// /// </summary> ! /// <param name="dialect"></param> /// <param name="p"></param> ! /// <returns></returns> string SqlCreateString( Dialect.Dialect dialect, IMapping p ); /// <summary> ! /// /// </summary> ! /// <param name="dialect"></param> ! /// <returns></returns> string SqlDropString( Dialect.Dialect dialect ); } --- 3,30 ---- namespace NHibernate.Mapping { ! /// <summary> ! /// Operations to create/drop the mapping element in the database. ! /// </summary> public interface IRelationalModel { /// <summary> ! /// When implemented by a class, generates the SQL string to create ! /// the mapping element in the database. /// </summary> ! /// <param name="dialect">The <see cref="Dialect.Dialect"/> to use for SQL rules.</param> /// <param name="p"></param> ! /// <returns> ! /// A string that contains the SQL to create an object. ! /// </returns> string SqlCreateString( Dialect.Dialect dialect, IMapping p ); /// <summary> ! /// When implemented by a class, generates the SQL string to drop ! /// the mapping element from the database. /// </summary> ! /// <param name="dialect">The <see cref="Dialect.Dialect"/> to use for SQL rules.</param> ! /// <returns> ! /// A string that contains the SQL to drop an object. ! /// </returns> string SqlDropString( Dialect.Dialect dialect ); } Index: ForeignKey.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Mapping/ForeignKey.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ForeignKey.cs 31 Dec 2004 21:26:49 -0000 1.6 --- ForeignKey.cs 2 Jan 2005 22:03:39 -0000 1.7 *************** *** 3,7 **** namespace NHibernate.Mapping { ! /// <summary></summary> public class ForeignKey : Constraint { --- 3,9 ---- namespace NHibernate.Mapping { ! /// <summary> ! /// A Foreign Key constraint in the database. ! /// </summary> public class ForeignKey : Constraint { *************** *** 9,13 **** private System.Type referencedClass; ! /// <summary></summary> public ForeignKey() { --- 11,17 ---- private System.Type referencedClass; ! /// <summary> ! /// Initializes a new instance of the <see cref="ForeignKey"/> class. ! /// </summary> public ForeignKey() { *************** *** 15,23 **** /// <summary> ! /// /// </summary> ! /// <param name="d"></param> ! /// <param name="constraintName"></param> ! /// <returns></returns> public override string SqlConstraintString( Dialect.Dialect d, string constraintName ) { --- 19,29 ---- /// <summary> ! /// Generates the SQL string to create the named Foreign Key Constraint in the database. /// </summary> ! /// <param name="d">The <see cref="Dialect.Dialect"/> to use for SQL rules.</param> ! /// <param name="constraintName">The name to use as the identifier of the constraint in the database.</param> ! /// <returns> ! /// A string that contains the SQL to create the named Foreign Key Constraint. ! /// </returns> public override string SqlConstraintString( Dialect.Dialect d, string constraintName ) { *************** *** 42,46 **** } ! /// <summary></summary> public Table ReferencedTable { --- 48,59 ---- } ! /// <summary> ! /// Gets or sets the <see cref="Table"/> that the Foreign Key is referencing. ! /// </summary> ! /// <value>The <see cref="Table"/> the Foreign Key is referencing.</value> ! /// <exception cref="MappingException"> ! /// Thrown when the number of columns in this Foreign Key is not the same ! /// amount of columns as the Primary Key in the ReferencedTable. ! /// </exception> public Table ReferencedTable { *************** *** 65,69 **** } ! /// <summary></summary> public System.Type ReferencedClass { --- 78,87 ---- } ! /// <summary> ! /// Gets or sets the <see cref="System.Type"/> that this Foreign Key is referencing. ! /// </summary> ! /// <value> ! /// The <see cref="System.Type"/> that this Foreign Key is referencing. ! /// </value> public System.Type ReferencedClass { Index: UniqueKey.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Mapping/UniqueKey.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** UniqueKey.cs 31 Dec 2004 21:28:13 -0000 1.5 --- UniqueKey.cs 2 Jan 2005 22:03:39 -0000 1.6 *************** *** 4,15 **** namespace NHibernate.Mapping { ! /// <summary></summary> public class UniqueKey : Constraint { /// <summary> ! /// /// </summary> ! /// <param name="d"></param> ! /// <returns></returns> public string SqlConstraintString( Dialect.Dialect d ) { --- 4,19 ---- namespace NHibernate.Mapping { ! /// <summary> ! /// An Unique Key constraint in the database. ! /// </summary> public class UniqueKey : Constraint { /// <summary> ! /// Generates the SQL string to create the Unique Key Constraint in the database. /// </summary> ! /// <param name="d">The <see cref="Dialect.Dialect"/> to use for SQL rules.</param> ! /// <returns> ! /// A string that contains the SQL to create the Unique Key Constraint. ! /// </returns> public string SqlConstraintString( Dialect.Dialect d ) { *************** *** 33,41 **** /// <summary> ! /// /// </summary> ! /// <param name="d"></param> ! /// <param name="constraintName"></param> ! /// <returns></returns> public override string SqlConstraintString( Dialect.Dialect d, string constraintName ) { --- 37,46 ---- /// <summary> ! /// Generates the SQL string to create the Unique Key Constraint in the database. /// </summary> ! /// <param name="d">The <see cref="Dialect.Dialect"/> to use for SQL rules.</param> ! /// <returns> ! /// A string that contains the SQL to create the Unique Key Constraint. ! /// </returns> public override string SqlConstraintString( Dialect.Dialect d, string constraintName ) { Index: Column.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Mapping/Column.cs,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Column.cs 31 Dec 2004 21:26:38 -0000 1.14 --- Column.cs 2 Jan 2005 22:03:39 -0000 1.15 *************** *** 8,12 **** namespace NHibernate.Mapping { ! /// <summary></summary> public class Column { --- 8,14 ---- namespace NHibernate.Mapping { ! /// <summary> ! /// Represents the mapping to a column in a database. ! /// </summary> public class Column { *************** *** 25,29 **** internal int uniqueInteger; ! /// <summary></summary> public int Length { --- 27,34 ---- internal int uniqueInteger; ! /// <summary> ! /// Gets or sets the length of the datatype in the database. ! /// </summary> ! /// <value>The length of the datatype in the database.</value> public int Length { *************** *** 32,36 **** } ! /// <summary></summary> public IType Type { --- 37,46 ---- } ! /// <summary> ! /// Gets or sets the NHibernate <see cref="IType"/> of the column. ! /// </summary> ! /// <value> ! /// The NHibernate <see cref="IType"/> of the column. ! /// </value> public IType Type { *************** *** 39,43 **** } ! /// <summary></summary> public string Name { --- 49,70 ---- } ! /// <summary> ! /// Gets or sets the name of the column in the database. ! /// </summary> ! /// <value> ! /// The name of the column in the database. The get does ! /// not return a Quoted column name. ! /// </value> ! /// <remarks> ! /// <p> ! /// If a value is passed in that is wrapped by <c>`</c> then ! /// NHibernate will Quote the column whenever SQL is generated ! /// for it. How the column is quoted depends on the Dialect. ! /// </p> ! /// <p> ! /// The value returned by the getter is not Quoted. To get the ! /// column name in quoted form use <see cref="GetQuotedName(Dialect.Dialect)"/>. ! /// </p> ! /// </remarks> public string Name { *************** *** 58,65 **** /// <summary> ! /// /// </summary> ! /// <param name="d"></param> ! /// <returns></returns> public string GetQuotedName( Dialect.Dialect d ) { --- 85,98 ---- /// <summary> ! /// Gets the name of this Column in quoted form if it is necessary. /// </summary> ! /// <param name="d"> ! /// The <see cref="Dialect.Dialect"/> that knows how to quote ! /// the column name. ! /// </param> ! /// <returns> ! /// The column name in a form that is safe to use inside of a SQL statement. ! /// Quoted if it needs to be, not quoted if it does not need to be. ! /// </returns> public string GetQuotedName( Dialect.Dialect d ) { *************** *** 70,77 **** /// <summary> ! /// /// </summary> ! /// <param name="d"></param> ! /// <returns></returns> public string Alias( Dialect.Dialect d ) { --- 103,112 ---- /// <summary> ! /// Gets an Alias for the column name. /// </summary> ! /// <param name="d">The <see cref="Dialect.Dialect"/> that contains the rules for Aliasing.</param> ! /// <returns> ! /// A string that can be used as the alias for this Column. ! /// </returns> public string Alias( Dialect.Dialect d ) { *************** *** 92,100 **** /// <summary> ! /// /// </summary> ! /// <param name="d"></param> ! /// <param name="suffix"></param> ! /// <returns></returns> public string Alias( Dialect.Dialect d, string suffix ) { --- 127,137 ---- /// <summary> ! /// Gets an Alias for the column name. /// </summary> ! /// <param name="d">The <see cref="Dialect.Dialect"/> that contains the rules for Aliasing.</param> ! /// <param name="suffix">A string to use as the suffix for the Alias.</param> ! /// <returns> ! /// A string that can be used as the alias for this Column. ! /// </returns> public string Alias( Dialect.Dialect d, string suffix ) { *************** *** 108,112 **** return name + suffix; } - //return name.Substring(0, name.Length - suffix.Length); else { --- 145,148 ---- *************** *** 116,120 **** } ! /// <summary></summary> public bool IsNullable { --- 152,159 ---- } ! /// <summary> ! /// Gets or sets if the column can have null values in it. ! /// </summary> ! /// <value><c>true</c> if the column can have a null value in it.</value> public bool IsNullable { *************** *** 124,131 **** /// <summary> ! /// /// </summary> ! /// <param name="type"></param> ! /// <param name="typeIndex"></param> public Column( IType type, int typeIndex ) { --- 163,170 ---- /// <summary> ! /// Initializes a new instance of <see cref="Column"/>. /// </summary> ! /// <param name="type">The NHibernate <see cref="IType"/> that reads from and writes to the column.</param> ! /// <param name="typeIndex">The index of the column in the <see cref="IType"/>.</param> public Column( IType type, int typeIndex ) { *************** *** 134,138 **** } ! /// <summary></summary> public int TypeIndex { --- 173,182 ---- } ! /// <summary> ! /// Gets or sets the index of the column in the <see cref="IType"/>. ! /// </summary> ! /// <value> ! /// The index of the column in the <see cref="IType"/>. ! /// </value> public int TypeIndex { *************** *** 142,149 **** /// <summary> ! /// /// </summary> /// <param name="mapping"></param> ! /// <returns></returns> public SqlType GetAutoSqlType( IMapping mapping ) { --- 186,195 ---- /// <summary> ! /// Gets the <see cref="SqlType"/> of the column based on the <see cref="IType"/>. /// </summary> /// <param name="mapping"></param> ! /// <returns> ! /// The <see cref="SqlType"/> of the column based on the <see cref="IType"/>. ! /// </returns> public SqlType GetAutoSqlType( IMapping mapping ) { *************** *** 164,168 **** } ! /// <summary></summary> public bool IsUnique { --- 210,217 ---- } ! /// <summary> ! /// Gets or sets if the column contains unique values. ! /// </summary> ! /// <value><c>true</c> if the column contains unique values.</value> public bool IsUnique { *************** *** 172,180 **** /// <summary> ! /// /// </summary> ! /// <param name="dialect"></param> /// <param name="mapping"></param> ! /// <returns></returns> public string GetSqlType( Dialect.Dialect dialect, IMapping mapping ) { --- 221,236 ---- /// <summary> ! /// Gets the name of the data type for the column. /// </summary> ! /// <param name="dialect">The <see cref="Dialect.Dialect"/> to use to get the valid data types.</param> /// <param name="mapping"></param> ! /// <returns> ! /// The name of the data type for the column. ! /// </returns> ! /// <remarks> ! /// If the mapping file contains a value of the attribute <c>sql-type</c> this will ! /// return the string contained in that attribute. Otherwise it will use the ! /// typename from the <see cref="Dialect.Dialect"/> of the <see cref="SqlType"/> object. ! /// </remarks> public string GetSqlType( Dialect.Dialect dialect, IMapping mapping ) { *************** *** 190,198 **** } /// <summary> ! /// /// </summary> ! /// <param name="obj"></param> ! /// <returns></returns> public override bool Equals( object obj ) { --- 246,260 ---- } + #region System.Object Members + /// <summary> ! /// Determines if this instance of <see cref="Column"/> and a specified object, ! /// which must be a <b>Column</b> can be considered the same. /// </summary> ! /// <param name="obj">An <see cref="Object"/> that should be a <see cref="Column"/>.</param> ! /// <returns> ! /// <c>true</c> if the name of this Column and the other Column are the same, ! /// otherwise <c>false</c>. ! /// </returns> public override bool Equals( object obj ) { *************** *** 201,208 **** /// <summary> ! /// /// </summary> ! /// <param name="column"></param> ! /// <returns></returns> public bool Equals( Column column ) { --- 263,274 ---- /// <summary> ! /// Determines if this instance of <see cref="Column"/> and the specified Column ! /// can be considered the same. /// </summary> ! /// <param name="column">A <see cref="Column"/> to compare to this Column.</param> ! /// <returns> ! /// <c>true</c> if the name of this Column and the other Column are the same, ! /// otherwise <c>false</c>. ! /// </returns> public bool Equals( Column column ) { *************** *** 219,223 **** } ! /// <summary></summary> public override int GetHashCode() { --- 285,292 ---- } ! /// <summary> ! /// Returns the hash code for this instance. ! /// </summary> ! /// <value>The value of <see cref="Name.GetHashCode()">Name.GetHashCode()</see>.</value> public override int GetHashCode() { *************** *** 225,229 **** } ! /// <summary></summary> public string SqlType { --- 294,308 ---- } ! #endregion ! ! /// <summary> ! /// Gets or sets the sql data type name of the column. ! /// </summary> ! /// <value> ! /// The sql data type name of the column. ! /// </value> ! /// <remarks> ! /// This is usually read from the <c>sql-type</c> attribute. ! /// </remarks> public string SqlType { *************** *** 232,236 **** } ! /// <summary></summary> public bool IsQuoted { --- 311,318 ---- } ! /// <summary> ! /// Gets or sets if the column needs to be quoted in SQL statements. ! /// </summary> ! /// <value><c>true</c> if the column is quoted.</value> public bool IsQuoted { Index: PrimaryKey.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Mapping/PrimaryKey.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PrimaryKey.cs 31 Dec 2004 21:27:42 -0000 1.6 --- PrimaryKey.cs 2 Jan 2005 22:03:39 -0000 1.7 *************** *** 4,15 **** namespace NHibernate.Mapping { ! /// <summary></summary> public class PrimaryKey : Constraint { /// <summary> ! /// /// </summary> ! /// <param name="d"></param> ! /// <returns></returns> public string SqlConstraintString( Dialect.Dialect d ) { --- 4,19 ---- namespace NHibernate.Mapping { ! /// <summary> ! /// A Primary Key constraint in the database. ! /// </summary> public class PrimaryKey : Constraint { /// <summary> ! /// Generates the SQL string to create the Primary Key Constraint in the database. /// </summary> ! /// <param name="d">The <see cref="Dialect.Dialect"/> to use for SQL rules.</param> ! /// <returns> ! /// A string that contains the SQL to create the Primary Key Constraint. ! /// </returns> public string SqlConstraintString( Dialect.Dialect d ) { *************** *** 29,37 **** /// <summary> ! /// /// </summary> ! /// <param name="d"></param> ! /// <param name="constraintName"></param> ! /// <returns></returns> public override string SqlConstraintString( Dialect.Dialect d, string constraintName ) { --- 33,43 ---- /// <summary> ! /// Generates the SQL string to create the named Primary Key Constraint in the database. /// </summary> ! /// <param name="d">The <see cref="Dialect.Dialect"/> to use for SQL rules.</param> ! /// <param name="constraintName">The name to use as the identifier of the constraint in the database.</param> ! /// <returns> ! /// A string that contains the SQL to create the named Primary Key Constraint. ! /// </returns> public override string SqlConstraintString( Dialect.Dialect d, string constraintName ) { Index: Index.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Mapping/Index.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Index.cs 31 Dec 2004 21:27:02 -0000 1.5 --- Index.cs 2 Jan 2005 22:03:39 -0000 1.6 *************** *** 6,10 **** namespace NHibernate.Mapping { ! /// <summary></summary> public class Index : IRelationalModel { --- 6,12 ---- namespace NHibernate.Mapping { ! /// <summary> ! /// An Index in the database. ! /// </summary> public class Index : IRelationalModel { *************** *** 14,22 **** /// <summary> ! /// /// </summary> ! /// <param name="dialect"></param> /// <param name="p"></param> ! /// <returns></returns> public string SqlCreateString( Dialect.Dialect dialect, IMapping p ) { --- 16,26 ---- /// <summary> ! /// Generates the SQL string to create this Index in the database. /// </summary> ! /// <param name="dialect">The <see cref="Dialect.Dialect"/> to use for SQL rules.</param> /// <param name="p"></param> ! /// <returns> ! /// A string that contains the SQL to create this Index. ! /// </returns> public string SqlCreateString( Dialect.Dialect dialect, IMapping p ) { *************** *** 44,51 **** /// <summary> ! /// /// </summary> ! /// <param name="dialect"></param> ! /// <returns></returns> public string SqlDropString( Dialect.Dialect dialect ) { --- 48,57 ---- /// <summary> ! /// Generates the SQL string to drop this Index in the database. /// </summary> ! /// <param name="dialect">The <see cref="Dialect.Dialect"/> to use for SQL rules.</param> ! /// <returns> ! /// A string that contains the SQL to drop this Index. ! /// </returns> public string SqlDropString( Dialect.Dialect dialect ) { *************** *** 53,57 **** } ! /// <summary></summary> public Table Table { --- 59,68 ---- } ! /// <summary> ! /// Gets or sets the <see cref="Table"/> this Index is in. ! /// </summary> ! /// <value> ! /// The <see cref="Table"/> this Index is in. ! /// </value> public Table Table { *************** *** 60,64 **** } ! /// <summary></summary> public ICollection ColumnCollection { --- 71,82 ---- } ! /// <summary> ! /// Gets an <see cref="ICollection"/> of <see cref="Column"/> objects that are ! /// part of the Index. ! /// </summary> ! /// <value> ! /// An <see cref="ICollection"/> of <see cref="Column"/> objects that are ! /// part of the Index. ! /// </value> public ICollection ColumnCollection { *************** *** 67,73 **** /// <summary> ! /// /// </summary> ! /// <param name="column"></param> public void AddColumn( Column column ) { --- 85,92 ---- /// <summary> ! /// Adds the <see cref="Column"/> to the <see cref="ICollection"/> of ! /// Columns that are part of the Index. /// </summary> ! /// <param name="column">The <see cref="Column"/> to include in the Index.</param> public void AddColumn( Column column ) { *************** *** 78,82 **** } ! /// <summary></summary> public string Name { --- 97,104 ---- } ! /// <summary> ! /// Gets or sets the Name used to identify the Index in the database. ! /// </summary> ! /// <value>The Name used to identify the Index in the database.</value> public string Name { Index: Constraint.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Mapping/Constraint.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Constraint.cs 31 Dec 2004 21:26:38 -0000 1.5 --- Constraint.cs 2 Jan 2005 22:03:39 -0000 1.6 *************** *** 5,9 **** namespace NHibernate.Mapping { ! /// <summary></summary> public abstract class Constraint : IRelationalModel { --- 5,11 ---- namespace NHibernate.Mapping { ! /// <summary> ! /// Base class for Constraints in the database. ! /// </summary> public abstract class Constraint : IRelationalModel { *************** *** 12,16 **** private Table table; ! /// <summary></summary> public string Name { --- 14,21 ---- private Table table; ! /// <summary> ! /// Gets or sets the Name used to identify the constraint in the database. ! /// </summary> ! /// <value>The Name used to identify the constraint in the database.</value> public string Name { *************** *** 19,23 **** } ! /// <summary></summary> public ICollection ColumnCollection { --- 24,33 ---- } ! /// <summary> ! /// Gets an <see cref="ICollection"/> of <see cref="Column"/> objects that are part of the constraint. ! /// </summary> ! /// <value> ! /// An <see cref="ICollection"/> of <see cref="Column"/> objects that are part of the constraint. ! /// </value> public ICollection ColumnCollection { *************** *** 26,32 **** /// <summary> ! /// /// </summary> ! /// <param name="column"></param> public void AddColumn( Column column ) { --- 36,43 ---- /// <summary> ! /// Adds the <see cref="Column"/> to the <see cref="ICollection"/> of ! /// Columns that are part of the constraint. /// </summary> ! /// <param name="column">The <see cref="Column"/> to include in the Constraint.</param> public void AddColumn( Column column ) { *************** *** 37,41 **** } ! /// <summary></summary> public int ColumnSpan { --- 48,57 ---- } ! /// <summary> ! /// Gets the number of columns that this Constraint contains. ! /// </summary> ! /// <value> ! /// The number of columns that this Constraint contains. ! /// </value> public int ColumnSpan { *************** *** 43,47 **** } ! /// <summary></summary> public Table Table { --- 59,68 ---- } ! /// <summary> ! /// Gets or sets the <see cref="Table"/> this Constraint is in. ! /// </summary> ! /// <value> ! /// The <see cref="Table"/> this Constraint is in. ! /// </value> public Table Table { *************** *** 50,58 **** } /// <summary> ! /// /// </summary> ! /// <param name="dialect"></param> ! /// <returns></returns> public string SqlDropString( Dialect.Dialect dialect ) { --- 71,83 ---- } + #region IRelationModel Members + /// <summary> ! /// Generates the SQL string to drop this Constraint in the database. /// </summary> ! /// <param name="dialect">The <see cref="Dialect.Dialect"/> to use for SQL rules.</param> ! /// <returns> ! /// A string that contains the SQL to drop this Constraint. ! /// </returns> public string SqlDropString( Dialect.Dialect dialect ) { *************** *** 61,69 **** /// <summary> ! /// /// </summary> ! /// <param name="dialect"></param> /// <param name="p"></param> ! /// <returns></returns> public string SqlCreateString( Dialect.Dialect dialect, IMapping p ) { --- 86,96 ---- /// <summary> ! /// Generates the SQL string to create this Constraint in the database. /// </summary> ! /// <param name="dialect">The <see cref="Dialect.Dialect"/> to use for SQL rules.</param> /// <param name="p"></param> ! /// <returns> ! /// A string that contains the SQL to create this Constraint. ! /// </returns> public string SqlCreateString( Dialect.Dialect dialect, IMapping p ) { *************** *** 74,83 **** } /// <summary> ! /// /// </summary> ! /// <param name="d"></param> ! /// <param name="constraintName"></param> ! /// <returns></returns> public abstract string SqlConstraintString( Dialect.Dialect d, string constraintName ); --- 101,115 ---- } + #endregion + /// <summary> ! /// When implemented by a class, generates the SQL string to create the named ! /// Constraint in the database. /// </summary> ! /// <param name="d">The <see cref="Dialect.Dialect"/> to use for SQL rules.</param> ! /// <param name="constraintName">The name to use as the identifier of the constraint in the database.</param> ! /// <returns> ! /// A string that contains the SQL to create the named Constraint. ! /// </returns> public abstract string SqlConstraintString( Dialect.Dialect d, string constraintName ); Index: Table.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Mapping/Table.cs,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Table.cs 31 Dec 2004 21:28:13 -0000 1.14 --- Table.cs 2 Jan 2005 22:03:39 -0000 1.15 *************** *** 1,2 **** --- 1,3 ---- + using System; using System.Collections; using System.Data; *************** *** 25,29 **** private static int tableCounter = 0; ! /// <summary></summary> public Table() { --- 26,32 ---- private static int tableCounter = 0; ! /// <summary> ! /// Initializes a new instance of <see cref="Table"/>. ! /// </summary> public Table() { *************** *** 32,39 **** /// <summary> ! /// /// </summary> ! /// <param name="dialect"></param> ! /// <returns></returns> public string GetQualifiedName( Dialect.Dialect dialect ) { --- 35,42 ---- /// <summary> ! /// Gets the schema qualified name of the Table. /// </summary> ! /// <param name="dialect">The <see cref="Dialect.Dialect"/> that knows how to Quote the Table name.</param> ! /// <returns>The name of the table qualified with the schema if one is specified.</returns> public string GetQualifiedName( Dialect.Dialect dialect ) { *************** *** 44,50 **** /// <summary> ! /// Returns the QualifiedName for the table using the specified Qualifier /// </summary> ! /// <param name="dialect"></param> /// <param name="defaultQualifier">The Qualifier to use when accessing the table.</param> /// <returns>A String representing the Qualified name.</returns> --- 47,53 ---- /// <summary> ! /// Gets the schema qualified name of the Table using the specified qualifier /// </summary> ! /// <param name="dialect">The <see cref="Dialect.Dialect"/> that knows how to Quote the Table name.</param> /// <param name="defaultQualifier">The Qualifier to use when accessing the table.</param> /// <returns>A String representing the Qualified name.</returns> *************** *** 58,62 **** } ! /// <summary></summary> public string Name { --- 61,82 ---- } ! /// <summary> ! /// Gets or sets the name of the Table in the database. ! /// </summary> ! /// <value> ! /// The name of the Table in the database. The get does ! /// not return a Quoted Table name. ! /// </value> ! /// <remarks> ! /// <p> ! /// If a value is passed in that is wrapped by <c>`</c> then ! /// NHibernate will Quote the Table whenever SQL is generated ! /// for it. How the Table is quoted depends on the Dialect. ! /// </p> ! /// <p> ! /// The value returned by the getter is not Quoted. To get the ! /// column name in quoted form use <see cref="GetQuotedName(Dialect.Dialect)"/>. ! /// </p> ! /// </remarks> public string Name { *************** *** 77,84 **** /// <summary> ! /// /// </summary> ! /// <param name="dialect"></param> ! /// <returns></returns> public string GetQuotedName( Dialect.Dialect dialect ) { --- 97,109 ---- /// <summary> ! /// Gets the name of this Table in quoted form if it is necessary. /// </summary> ! /// <param name="dialect"> ! /// The <see cref="Dialect.Dialect"/> that knows how to quote the Table name. ! /// </param> ! /// <returns> ! /// The Table name in a form that is safe to use inside of a SQL statement. ! /// Quoted if it needs to be, not quoted if it does not need to be. ! /// </returns> public string GetQuotedName( Dialect.Dialect dialect ) { *************** *** 89,96 **** /// <summary> ! /// /// </summary> ! /// <param name="n"></param> ! /// <returns></returns> public Column GetColumn( int n ) { --- 114,123 ---- /// <summary> ! /// Gets the <see cref="Column"/> at the specified index. /// </summary> ! /// <param name="n">The index of the Column to get.</param> ! /// <returns> ! /// The <see cref="Column"/> at the specified index. ! /// </returns> public Column GetColumn( int n ) { *************** *** 104,110 **** /// <summary> ! /// /// </summary> ! /// <param name="column"></param> public void AddColumn( Column column ) { --- 131,138 ---- /// <summary> ! /// Adds the <see cref="Column"/> to the <see cref="ICollection"/> of ! /// Columns that are part of the Table. /// </summary> ! /// <param name="column">The <see cref="Column"/> to include in the Table.</param> public void AddColumn( Column column ) { *************** *** 121,125 **** } ! /// <summary></summary> public int ColumnSpan { --- 149,158 ---- } ! /// <summary> ! /// Gets the number of columns that this Table contains. ! /// </summary> ! /// <value> ! /// The number of columns that this Table contains. ! /// </value> public int ColumnSpan { *************** *** 127,131 **** } ! /// <summary></summary> public ICollection ColumnCollection { --- 160,171 ---- } ! /// <summary> ! /// Gets an <see cref="ICollection"/> of <see cref="Column"/> objects that ! /// are part of the Table. ! /// </summary> ! /// <value> ! /// An <see cref="ICollection"/> of <see cref="Column"/> objects that are ! /// part of the Table. ! /// </value> public ICollection ColumnCollection { *************** *** 133,137 **** } ! /// <summary></summary> public ICollection IndexCollection { --- 173,184 ---- } ! /// <summary> ! /// Gets an <see cref="ICollection"/> of <see cref="Index"/> objects that ! /// are part of the Table. ! /// </summary> ! /// <value> ! /// An <see cref="ICollection"/> of <see cref="Index"/> objects that are ! /// part of the Table. ! /// </value> public ICollection IndexCollection { *************** *** 139,143 **** } ! /// <summary></summary> public ICollection ForeignKeyCollection { --- 186,197 ---- } ! /// <summary> ! /// Gets an <see cref="ICollection"/> of <see cref="ForeignKey"/> objects that ! /// are part of the Table. ! /// </summary> ! /// <value> ! /// An <see cref="ICollection"/> of <see cref="ForeignKey"/> objects that are ! /// part of the Table. ! /// </value> public ICollection ForeignKeyCollection { *************** *** 145,149 **** } ! /// <summary></summary> public ICollection UniqueKeyCollection { --- 199,210 ---- } ! /// <summary> ! /// Gets an <see cref="ICollection"/> of <see cref="UniqueKey"/> objects that ! /// are part of the Table. ! /// </summary> ! /// <value> ! /// An <see cref="ICollection"/> of <see cref="UniqueKey"/> objects that are ! /// part of the Table. ! /// </value> public ICollection UniqueKeyCollection { *************** *** 192,200 **** /// <summary> ! /// /// </summary> ! /// <param name="dialect"></param> /// <param name="p"></param> ! /// <returns></returns> public string SqlCreateString( Dialect.Dialect dialect, IMapping p ) { --- 253,264 ---- /// <summary> ! /// Generates the SQL string to create this Table in the database. /// </summary> ! /// <param name="dialect">The <see cref="Dialect.Dialect"/> to use for SQL rules.</param> /// <param name="p"></param> ! /// <returns> ! /// A string that contains the SQL to create this Table, Primary Key Constraints ! /// , and Unique Key Constraints. ! /// </returns> public string SqlCreateString( Dialect.Dialect dialect, IMapping p ) { *************** *** 205,209 **** bool identityColumn = idValue != null && idValue.CreateIdentifierGenerator( dialect ) is IdentityGenerator; ! // try to find out the name of the pk to create it as identity if the identitygenerator is used string pkname = null; if( primaryKey != null && identityColumn ) --- 269,274 ---- bool identityColumn = idValue != null && idValue.CreateIdentifierGenerator( dialect ) is IdentityGenerator; ! // try to find out the name of the pk to create it as identity if the ! // identitygenerator is used string pkname = null; if( primaryKey != null && identityColumn ) *************** *** 279,286 **** /// <summary> ! /// /// </summary> ! /// <param name="dialect"></param> ! /// <returns></returns> public string SqlDropString( Dialect.Dialect dialect ) { --- 344,354 ---- /// <summary> ! /// Generates the SQL string to drop this Table in the database. /// </summary> ! /// <param name="dialect">The <see cref="Dialect.Dialect"/> to use for SQL rules.</param> ! /// <returns> ! /// A string that contains the SQL to drop this Table and to cascade the drop to ! /// the constraints if the database supports it. ! /// </returns> public string SqlDropString( Dialect.Dialect dialect ) { *************** *** 288,292 **** } ! /// <summary></summary> public PrimaryKey PrimaryKey { --- 356,363 ---- } ! /// <summary> ! /// Gets or sets the <see cref="PrimaryKey"/> of the Table. ! /// </summary> ! /// <value>The <see cref="PrimaryKey"/> of the Table.</value> public PrimaryKey PrimaryKey { *************** *** 296,303 **** /// <summary> ! /// /// </summary> ! /// <param name="name"></param> ! /// <returns></returns> public Index GetIndex( string name ) { --- 367,377 ---- /// <summary> ! /// Gets the <see cref="Index"/> identified by the name. /// </summary> ! /// <param name="name">The name of the <see cref="Index"/> to get.</param> ! /// <returns> ! /// The <see cref="Index"/> identified by the name. If the <see cref="Index"/> ! /// identified by the name does not exist then it is created. ! /// </returns> public Index GetIndex( string name ) { *************** *** 316,323 **** /// <summary> ! /// /// </summary> ! /// <param name="name"></param> ! /// <returns></returns> public UniqueKey GetUniqueKey( string name ) { --- 390,400 ---- /// <summary> ! /// Gets the <see cref="UniqueKey"/> identified by the name. /// </summary> ! /// <param name="name">The name of the <see cref="UniqueKey"/> to get.</param> ! /// <returns> ! /// The <see cref="UniqueKey"/> identified by the name. If the <see cref="UniqueKey"/> ! /// identified by the name does not exist then it is created. ! /// </returns> public UniqueKey GetUniqueKey( string name ) { *************** *** 336,343 **** /// <summary> ! /// /// </summary> ! /// <param name="columns"></param> ! /// <returns></returns> public ForeignKey CreateForeignKey( IList columns ) { --- 413,427 ---- /// <summary> ! /// Create a <see cref="ForeignKey"/> for the columns in the Table. /// </summary> ! /// <param name="columns">An <see cref="IList"/> of <see cref="Column"/> objects.</param> ! /// <returns> ! /// A <see cref="ForeignKey"/> for the columns in the Table. ! /// </returns> ! /// <remarks> ! /// This does not necessarily create a <see cref="ForeignKey"/>, if ! /// one already exists for the columns then it will return an ! /// existing <see cref="ForeignKey"/>. ! /// </remarks> public ForeignKey CreateForeignKey( IList columns ) { *************** *** 362,369 **** /// <summary> ! /// /// </summary> ! /// <param name="col"></param> ! /// <returns></returns> public string UniqueColumnString( ICollection col ) { --- 446,456 ---- /// <summary> ! /// Generates a unique string for an <see cref="ICollection"/> of ! /// <see cref="Column"/> objects. /// </summary> ! /// <param name="col">An <see cref="ICollection"/> of <see cref="Column"/> objects.</param> ! /// <returns> ! /// An unique string for the <see cref="Column"/> objects. ! /// </returns> public string UniqueColumnString( ICollection col ) { *************** *** 381,389 **** } } ! return ( name.GetHashCode().ToString( "X" ) + result.GetHashCode().ToString( "X" ) ); } ! /// <summary></summary> public string Schema { --- 468,481 ---- } } ! // "X"= hexadecimal format return ( name.GetHashCode().ToString( "X" ) + result.GetHashCode().ToString( "X" ) ); } ! /// <summary> ! /// Gets or sets the schema the table is in. ! /// </summary> ! /// <value> ! /// The schema the table is in or <c>null</c> if no schema is specified. ! /// </value> public string Schema { *************** *** 392,396 **** } ! /// <summary></summary> public int UniqueInteger { --- 484,491 ---- } ! /// <summary> ! /// Gets the unique number of the Table. ! /// </summary> ! /// <value>The unique number of the Table.</value> public int UniqueInteger { *************** *** 399,405 **** /// <summary> ! /// /// </summary> ! /// <param name="idValue"></param> public void SetIdentifierValue( Value idValue ) { --- 494,500 ---- /// <summary> ! /// Sets the Identifier of the Table. /// </summary> ! /// <param name="idValue">The <see cref="Value"/> that represents the Identifier.</param> public void SetIdentifierValue( Value idValue ) { *************** *** 407,411 **** } ! /// <summary></summary> public bool IsQuoted { --- 502,509 ---- } ! /// <summary> ! /// Gets or sets if the column needs to be quoted in SQL statements. ! /// </summary> ! /// <value><c>true</c> if the column is quoted.</value> public bool IsQuoted { Index: Formula.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Mapping/Formula.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Formula.cs 31 Dec 2004 21:26:49 -0000 1.4 --- Formula.cs 2 Jan 2005 22:03:39 -0000 1.5 *************** *** 25,29 **** /// <param name="dialect"></param> /// <returns></returns> ! public String GetTemplate( Dialect.Dialect dialect ) { return Template.RenderWhereStringTemplate( formula, dialect ); --- 25,29 ---- /// <param name="dialect"></param> /// <returns></returns> ! public string GetTemplate( Dialect.Dialect dialect ) { return Template.RenderWhereStringTemplate( formula, dialect ); *************** *** 31,35 **** /// <summary></summary> ! public String Alias { get { return "f" + uniqueInteger.ToString() + StringHelper.Underscore; } --- 31,35 ---- /// <summary></summary> ! public string Alias { get { return "f" + uniqueInteger.ToString() + StringHelper.Underscore; } |