From: Peter S. <sz...@us...> - 2004-04-30 08:20:58
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Cfg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14298/NHibernate/Cfg Modified Files: Environment.cs Mappings.cs Log Message: Mapping.cs Index: Mappings.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Cfg/Mappings.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Mappings.cs 12 Apr 2004 05:43:26 -0000 1.5 --- Mappings.cs 30 Apr 2004 08:20:50 -0000 1.6 *************** *** 3,11 **** using NHibernate.Mapping; ! namespace NHibernate.Cfg { /// <summary> /// A collection of mappings from classes and collections to relational database tables. /// </summary> ! public class Mappings { private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(Mappings)); --- 3,13 ---- using NHibernate.Mapping; ! namespace NHibernate.Cfg ! { /// <summary> /// A collection of mappings from classes and collections to relational database tables. /// </summary> ! public class Mappings ! { private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(Mappings)); *************** *** 20,24 **** private bool autoImport; ! internal Mappings(IDictionary classes, IDictionary collections, IDictionary tables, IDictionary queries, IDictionary imports, IList secondPasses) { this.classes = classes; this.collections = collections; --- 22,27 ---- private bool autoImport; ! internal Mappings(IDictionary classes, IDictionary collections, IDictionary tables, IDictionary queries, IDictionary imports, IList secondPasses) ! { this.classes = classes; this.collections = collections; *************** *** 29,33 **** } ! public void AddClass(PersistentClass persistentClass) { object old = classes[persistentClass.PersistentClazz]; if (old!=null) log.Warn ( "duplicate class mapping: " + persistentClass.PersistentClazz.Name ); --- 32,37 ---- } ! public void AddClass(PersistentClass persistentClass) ! { object old = classes[persistentClass.PersistentClazz]; if (old!=null) log.Warn ( "duplicate class mapping: " + persistentClass.PersistentClazz.Name ); *************** *** 35,39 **** } ! public void AddCollection(Mapping.Collection collection) { object old = collections[collection.Role]; if (old!=null) log.Warn ( "duplicate collection role: " + collection.Role ); --- 39,44 ---- } ! public void AddCollection(Mapping.Collection collection) ! { object old = collections[collection.Role]; if (old!=null) log.Warn ( "duplicate collection role: " + collection.Role ); *************** *** 41,53 **** } ! public PersistentClass GetClass(System.Type type) { return (PersistentClass) classes[type]; } ! public Mapping.Collection GetCollection(string role) { return (Mapping.Collection) collections[role]; } ! public void AddImport(string className, string rename) { if ( imports.Contains(rename) && (string)imports[rename] != className) throw new MappingException("duplicate import: " + rename); --- 46,61 ---- } ! public PersistentClass GetClass(System.Type type) ! { return (PersistentClass) classes[type]; } ! public Mapping.Collection GetCollection(string role) ! { return (Mapping.Collection) collections[role]; } ! public void AddImport(string className, string rename) ! { if ( imports.Contains(rename) && (string)imports[rename] != className) throw new MappingException("duplicate import: " + rename); *************** *** 55,63 **** } ! public Table AddTable(string schema, string name) { string key = schema != null ? schema + "." + name : name; Table table = (Table) tables[key]; ! if (table==null) { table = new Table(); table.Name = name; --- 63,73 ---- } ! public Table AddTable(string schema, string name) ! { string key = schema != null ? schema + "." + name : name; Table table = (Table) tables[key]; ! if (table==null) ! { table = new Table(); table.Name = name; *************** *** 68,99 **** } ! public Table GetTable(string schema, string name) { string key = schema != null ? schema + "." + name : name; return (Table) tables[key]; } ! public string SchemaName { ! get { return schemaName; } ! set { schemaName = value; } } ! public string DefaultCascade { ! get { return defaultCascade; } ! set { defaultCascade = value; } } ! public void AddQuery(string name, string query) { object old = queries[name]; if (old!=null) log.Warn("duplicate query name: " + name); queries[name] = query; } ! public string GetQuery(string name) { return (string) queries[name]; } ! internal void AddSecondPass(Binder.SecondPass sp) { secondPasses.Add(sp); } ! public bool IsAutoImport { ! get { return autoImport; } ! set { autoImport = value; } } } --- 78,138 ---- } ! public Table GetTable(string schema, string name) ! { string key = schema != null ? schema + "." + name : name; return (Table) tables[key]; } ! ! public string SchemaName ! { ! get ! { ! return schemaName; ! } ! set ! { ! schemaName = value; ! } } ! ! public string DefaultCascade ! { ! get ! { ! return defaultCascade; ! } ! set ! { ! defaultCascade = value; ! } } ! public void AddQuery(string name, string query) ! { object old = queries[name]; if (old!=null) log.Warn("duplicate query name: " + name); queries[name] = query; } ! ! public string GetQuery(string name) ! { return (string) queries[name]; } ! ! internal void AddSecondPass(Binder.SecondPass sp) ! { secondPasses.Add(sp); } ! public bool IsAutoImport ! { ! get ! { ! return autoImport; ! } ! set ! { ! autoImport = value; ! } } } Index: Environment.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Cfg/Environment.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Environment.cs 29 Mar 2004 04:04:57 -0000 1.11 --- Environment.cs 30 Apr 2004 08:20:50 -0000 1.12 *************** *** 31,35 **** private static IDictionary isolationLevels = new Hashtable(); ! private const string Version = "0.1 beta 1"; public const string ConnectionProvider = "hibernate.connection.provider"; --- 31,35 ---- private static IDictionary isolationLevels = new Hashtable(); ! private const string Version = "prealpha3"; public const string ConnectionProvider = "hibernate.connection.provider"; |