Update of /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Schema
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7036/src/Adapdev.Data/Schema
Modified Files:
ForeignKeyAssociation.cs
Added Files:
AssociationType.cs
Log Message:
Improved ObjectComparer to include field comparisons
Added AssociationType for ForeignKeyAssociations
Improved CacheManager and associated tests
--- NEW FILE: AssociationType.cs ---
using System;
namespace Adapdev.Data.Schema
{
/// <summary>
/// Summary description for AssociationType.
/// </summary>
public enum AssociationType
{
OneToOne,
OneToMany,
ManyToMany,
ManyToOne
}
}
Index: ForeignKeyAssociation.cs
===================================================================
RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Schema/ForeignKeyAssociation.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ForeignKeyAssociation.cs 25 Mar 2005 02:16:30 -0000 1.1
--- ForeignKeyAssociation.cs 2 Nov 2005 13:45:13 -0000 1.2
***************
*** 13,16 ****
--- 13,17 ----
private TableSchema _foreignTable = null;
private ColumnSchema _columnSchema = null;
+ private AssociationType _association = AssociationType.OneToMany;
public ColumnSchema ForeignColumn
***************
*** 20,23 ****
--- 21,29 ----
}
+ public string ForeignColumnName
+ {
+ get{return this._foreignColumn.Name;}
+ }
+
public ColumnSchema Column
{
***************
*** 26,29 ****
--- 32,40 ----
}
+ public string ColumnName
+ {
+ get{return this._columnSchema.Name;}
+ }
+
public TableSchema ForeignTable
{
***************
*** 32,35 ****
--- 43,62 ----
}
+ public string ForeignTableName
+ {
+ get{return this._foreignTable.Name;}
+ }
+
+ public string ForeignKeyName
+ {
+ get{return this.ColumnName + "-" + this.ForeignTableName + "." + this.ForeignColumnName;}
+ }
+
+ public AssociationType AssociationType
+ {
+ get { return _association; }
+ set { _association = value; }
+ }
+
public ForeignKeyAssociation(ColumnSchema columnSchema, ColumnSchema foreignColumn, TableSchema foreignTable)
{
***************
*** 39,42 ****
--- 66,70 ----
}
+
public override string ToString()
{
|