From: Kevin W. <kev...@us...> - 2004-12-31 21:27:27
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Mapping In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31962 Modified Files: Index.cs IndexedCollection.cs IntegerValue.cs IRelationalModel.cs Log Message: fixing xml comments and letting ReSharper do reformatting Index: IntegerValue.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Mapping/IntegerValue.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** IntegerValue.cs 13 Apr 2004 02:06:54 -0000 1.4 --- IntegerValue.cs 31 Dec 2004 21:27:02 -0000 1.5 *************** *** 1,15 **** - using System; using NHibernate.Type; ! namespace NHibernate.Mapping ! { public class IntegerValue : Value { ! public IntegerValue(Table table) : base(table) { } ! public override IType Type { get { return NHibernate.Int32; } } } ! } --- 1,22 ---- using NHibernate.Type; ! namespace NHibernate.Mapping ! { ! /// <summary></summary> public class IntegerValue : Value { ! /// <summary> ! /// ! /// </summary> ! /// <param name="table"></param> ! public IntegerValue( Table table ) : base( table ) ! { ! } ! /// <summary></summary> ! public override IType Type { get { return NHibernate.Int32; } } } ! } \ No newline at end of file Index: Index.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Mapping/Index.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Index.cs 13 Apr 2004 02:06:54 -0000 1.4 --- Index.cs 31 Dec 2004 21:27:02 -0000 1.5 *************** *** 1,12 **** - using System; using System.Collections; using System.Text; using NHibernate.Engine; using NHibernate.Util; - using NHibernate.Dialect; ! namespace NHibernate.Mapping { ! public class Index : IRelationalModel { private Table table; --- 1,11 ---- using System.Collections; using System.Text; using NHibernate.Engine; using NHibernate.Util; ! namespace NHibernate.Mapping { ! /// <summary></summary> ! public class Index : IRelationalModel { private Table table; *************** *** 14,44 **** private string name; ! public string SqlCreateString(Dialect.Dialect dialect, IMapping p) { ! StringBuilder buf = new StringBuilder("create index ") ! .Append( dialect.QualifyIndexName ? name : StringHelper.Unqualify(name) ) ! .Append(" on ") ! .Append( table.GetQualifiedName(dialect)) ! .Append(" ("); ! bool commaNeeded = false; ! for(int i=0; i<columns.Count; i++) { ! if(commaNeeded) buf.Append(StringHelper.CommaSpace); commaNeeded = true; ! buf.Append( ((Column)columns[i]).GetQuotedName(dialect) ); } ! buf.Append(StringHelper.ClosedParen); return buf.ToString(); } ! public string SqlDropString(Dialect.Dialect dialect) { ! return "drop index " + table.GetQualifiedName(dialect) + StringHelper.Dot + name; } ! public Table Table { get { return table; } --- 13,58 ---- private string name; ! /// <summary> ! /// ! /// </summary> ! /// <param name="dialect"></param> ! /// <param name="p"></param> ! /// <returns></returns> ! public string SqlCreateString( Dialect.Dialect dialect, IMapping p ) { ! StringBuilder buf = new StringBuilder( "create index " ) ! .Append( dialect.QualifyIndexName ? name : StringHelper.Unqualify( name ) ) ! .Append( " on " ) ! .Append( table.GetQualifiedName( dialect ) ) ! .Append( " (" ); ! bool commaNeeded = false; ! for( int i = 0; i < columns.Count; i++ ) { ! if( commaNeeded ) ! { ! buf.Append( StringHelper.CommaSpace ); ! } commaNeeded = true; ! buf.Append( ( ( Column ) columns[ i ] ).GetQuotedName( dialect ) ); } ! buf.Append( StringHelper.ClosedParen ); return buf.ToString(); } ! /// <summary> ! /// ! /// </summary> ! /// <param name="dialect"></param> ! /// <returns></returns> ! public string SqlDropString( Dialect.Dialect dialect ) { ! return "drop index " + table.GetQualifiedName( dialect ) + StringHelper.Dot + name; } ! /// <summary></summary> ! public Table Table { get { return table; } *************** *** 46,60 **** } ! public ICollection ColumnCollection { get { return columns; } } ! public void AddColumn(Column column) { ! if (!columns.Contains(column)) columns.Add(column); } ! public string Name { get { return name; } --- 60,83 ---- } ! /// <summary></summary> ! public ICollection ColumnCollection { get { return columns; } } ! /// <summary> ! /// ! /// </summary> ! /// <param name="column"></param> ! public void AddColumn( Column column ) { ! if( !columns.Contains( column ) ) ! { ! columns.Add( column ); ! } } ! /// <summary></summary> ! public string Name { get { return name; } *************** *** 62,64 **** } } ! } --- 85,87 ---- } } ! } \ No newline at end of file Index: IRelationalModel.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Mapping/IRelationalModel.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IRelationalModel.cs 13 Apr 2004 02:06:54 -0000 1.2 --- IRelationalModel.cs 31 Dec 2004 21:27:02 -0000 1.3 *************** *** 1,12 **** - using System; - using NHibernate.Engine; ! namespace NHibernate.Mapping { ! public interface IRelationalModel { ! string SqlCreateString(Dialect.Dialect dialect, IMapping p); ! string SqlDropString(Dialect.Dialect dialect); } ! } --- 1,23 ---- using NHibernate.Engine; ! 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 ); } ! } \ No newline at end of file Index: IndexedCollection.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Mapping/IndexedCollection.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** IndexedCollection.cs 22 Nov 2004 03:56:00 -0000 1.4 --- IndexedCollection.cs 31 Dec 2004 21:27:02 -0000 1.5 *************** *** 1,5 **** ! using System; ! ! namespace NHibernate.Mapping { /// <summary> --- 1,3 ---- ! namespace NHibernate.Mapping { /// <summary> *************** *** 7,21 **** /// and primitive Arrays. /// </summary> ! public abstract class IndexedCollection : Collection { public const string DefaultIndexColumnName = "idx"; private Value index; ! protected IndexedCollection(PersistentClass owner) : base(owner) ! { } ! public Value Index { get { return index; } --- 5,25 ---- /// and primitive Arrays. /// </summary> ! public abstract class IndexedCollection : Collection { + /// <summary></summary> public const string DefaultIndexColumnName = "idx"; private Value index; ! /// <summary> ! /// ! /// </summary> ! /// <param name="owner"></param> ! protected IndexedCollection( PersistentClass owner ) : base( owner ) ! { } ! /// <summary></summary> ! public Value Index { get { return index; } *************** *** 23,42 **** } ! public override bool IsIndexed { get { return true; } } ! public void CreatePrimaryKey() { PrimaryKey pk = new PrimaryKey(); ! ! foreach(Column col in Key.ColumnCollection ) { ! pk.AddColumn(col); } ! foreach(Column col in Index.ColumnCollection) { ! pk.AddColumn(col); } --- 27,48 ---- } ! /// <summary></summary> ! public override bool IsIndexed { get { return true; } } ! /// <summary></summary> ! public void CreatePrimaryKey() { PrimaryKey pk = new PrimaryKey(); ! ! foreach( Column col in Key.ColumnCollection ) { ! pk.AddColumn( col ); } ! foreach( Column col in Index.ColumnCollection ) { ! pk.AddColumn( col ); } *************** *** 44,46 **** } } ! } --- 50,52 ---- } } ! } \ No newline at end of file |