You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
(248) |
May
(82) |
Jun
(90) |
Jul
(177) |
Aug
(253) |
Sep
(157) |
Oct
(151) |
Nov
(143) |
Dec
(278) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(152) |
Feb
(107) |
Mar
(177) |
Apr
(133) |
May
(259) |
Jun
(81) |
Jul
(119) |
Aug
(306) |
Sep
(416) |
Oct
(240) |
Nov
(329) |
Dec
(206) |
2006 |
Jan
(466) |
Feb
(382) |
Mar
(153) |
Apr
(162) |
May
(133) |
Jun
(21) |
Jul
(18) |
Aug
(37) |
Sep
(97) |
Oct
(114) |
Nov
(110) |
Dec
(28) |
2007 |
Jan
(74) |
Feb
(65) |
Mar
(49) |
Apr
(76) |
May
(43) |
Jun
(15) |
Jul
(68) |
Aug
(55) |
Sep
(63) |
Oct
(59) |
Nov
(70) |
Dec
(66) |
2008 |
Jan
(71) |
Feb
(60) |
Mar
(120) |
Apr
(31) |
May
(48) |
Jun
(81) |
Jul
(107) |
Aug
(51) |
Sep
(80) |
Oct
(83) |
Nov
(83) |
Dec
(79) |
2009 |
Jan
(83) |
Feb
(110) |
Mar
(97) |
Apr
(91) |
May
(291) |
Jun
(250) |
Jul
(197) |
Aug
(58) |
Sep
(54) |
Oct
(122) |
Nov
(68) |
Dec
(34) |
2010 |
Jan
(50) |
Feb
(17) |
Mar
(63) |
Apr
(61) |
May
(84) |
Jun
(81) |
Jul
(138) |
Aug
(144) |
Sep
(78) |
Oct
(26) |
Nov
(30) |
Dec
(61) |
2011 |
Jan
(33) |
Feb
(35) |
Mar
(166) |
Apr
(221) |
May
(109) |
Jun
(76) |
Jul
(27) |
Aug
(37) |
Sep
(1) |
Oct
(4) |
Nov
(2) |
Dec
(1) |
2012 |
Jan
|
Feb
|
Mar
(2) |
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
2013 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
(3) |
Oct
(2) |
Nov
|
Dec
(1) |
2014 |
Jan
(1) |
Feb
(1) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Michael D. <mik...@us...> - 2004-08-23 02:09:29
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Type In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24109/Type Modified Files: ComponentType.cs Log Message: Fixed up errors in ctor when it runs into a Field Getter/Setter Index: ComponentType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/ComponentType.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ComponentType.cs 22 Aug 2004 06:24:26 -0000 1.9 --- ComponentType.cs 23 Aug 2004 02:09:17 -0000 1.10 *************** *** 71,77 **** for (int i=0; i<propertySpan; i++) { ! getterNames[i] = getters[i].Property.Name; ! setterNames[i] = setters[i].Property.Name; ! propTypes[i] = getters[i].Property.PropertyType; } --- 71,77 ---- for (int i=0; i<propertySpan; i++) { ! getterNames[i] = getters[i].PropertyName; ! setterNames[i] = setters[i].PropertyName; ! propTypes[i] = getters[i].ReturnType; } |
From: Michael D. <mik...@us...> - 2004-08-23 02:09:29
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24109/Persister Modified Files: AbstractEntityPersister.cs Log Message: Fixed up errors in ctor when it runs into a Field Getter/Setter Index: AbstractEntityPersister.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister/AbstractEntityPersister.cs,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** AbstractEntityPersister.cs 22 Aug 2004 06:23:40 -0000 1.21 --- AbstractEntityPersister.cs 23 Aug 2004 02:09:17 -0000 1.22 *************** *** 615,621 **** getters[i] = prop.GetGetter( mappedClass ); setters[i] = prop.GetSetter( mappedClass ); ! getterNames[i] = getters[i].Property.Name; ! setterNames[i] = setters[i].Property.Name; ! types[i] = getters[i].Property.PropertyType; propertyTypes[i] = prop.Type; propertyUpdateability[i] = prop.IsUpdateable; --- 615,621 ---- getters[i] = prop.GetGetter( mappedClass ); setters[i] = prop.GetSetter( mappedClass ); ! getterNames[i] = getters[i].PropertyName; ! setterNames[i] = setters[i].PropertyName; ! types[i] = getters[i].ReturnType; propertyTypes[i] = prop.Type; propertyUpdateability[i] = prop.IsUpdateable; |
From: Michael D. <mik...@us...> - 2004-08-22 06:39:33
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2903/NHibernate Modified Files: NHibernate-1.1.csproj Log Message: Removed Sql folder - no longer needed. Index: NHibernate-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/NHibernate-1.1.csproj,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** NHibernate-1.1.csproj 22 Aug 2004 06:26:34 -0000 1.38 --- NHibernate-1.1.csproj 22 Aug 2004 06:39:22 -0000 1.39 *************** *** 1403,1407 **** BuildAction = "Compile" /> - <Folder RelPath = "Sql\" /> <File RelPath = "SqlCommand\Alias.cs" --- 1403,1406 ---- |
From: Michael D. <mik...@us...> - 2004-08-22 06:26:45
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32402/NHibernate Modified Files: NHibernate-1.1.csproj Log Message: Added Property namespace. Index: NHibernate-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/NHibernate-1.1.csproj,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** NHibernate-1.1.csproj 20 Aug 2004 17:39:03 -0000 1.37 --- NHibernate-1.1.csproj 22 Aug 2004 06:26:34 -0000 1.38 *************** *** 1324,1327 **** --- 1324,1387 ---- /> <File + RelPath = "Property\BasicGetter.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "Property\BasicPropertyAccessor.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "Property\BasicSetter.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "Property\FieldAccessor.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "Property\FieldGetter.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "Property\FieldMUnderscorePrefixAccessor.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "Property\FieldSetter.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "Property\FieldUnderscorePrefixAccessor.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "Property\IGetter.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "Property\IPropertyAccessor.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "Property\ISetter.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "Property\PropertyAccessorFactory.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Proxy\HibernateProxy.cs" SubType = "Code" |
From: Michael D. <mik...@us...> - 2004-08-22 06:26:19
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32288/NHibernate/Util Modified Files: ReflectHelper.cs Log Message: Moved Getter and Setter code out of ReflectHelper and into the Property namespace. Index: ReflectHelper.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Util/ReflectHelper.cs,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ReflectHelper.cs 1 Aug 2004 14:58:46 -0000 1.12 --- ReflectHelper.cs 22 Aug 2004 06:26:06 -0000 1.13 *************** *** 3,67 **** using NHibernate.Type; ! namespace NHibernate.Util { ! public sealed class ReflectHelper { private static System.Type[] NoClasses = new System.Type[0]; private static System.Type[] Object = new System.Type[] { typeof(object) }; private static MethodInfo ObjectEquals; ! public sealed class Setter { ! private System.Type clazz; ! private PropertyInfo property; ! private string propertyName; ! ! public Setter(System.Type clazz, PropertyInfo property, string propertyName) { ! this.clazz = clazz; ! this.property = property; ! this.propertyName = propertyName; ! } ! ! public void Set(object target, object value) { ! try { ! property.SetValue(target, value, new object[0]); ! } catch (Exception e) { ! throw new PropertyAccessException(e, "Exception occurred", true, clazz, propertyName); ! } ! } ! public PropertyInfo Property { ! get { return property; } ! } ! } ! ! public sealed class Getter { ! private System.Type clazz; ! private PropertyInfo property; ! private string propertyName; ! ! public Getter(System.Type clazz, PropertyInfo property, string propertyName) { ! this.clazz = clazz; ! this.property = property; ! this.propertyName = propertyName; ! } ! ! public object Get(object target) { ! try { ! return property.GetValue(target, new object[0]); ! } catch (Exception e) { ! throw new PropertyAccessException(e, "Exception occurred", false, clazz, propertyName); ! } ! } ! public System.Type ReturnType { ! get { return property.PropertyType; } ! } ! public PropertyInfo Property { ! get { return property; } ! } ! } ! ! static ReflectHelper() { MethodInfo eq; ! try { eq = typeof(object).GetMethod("Equals", BindingFlags.Instance | BindingFlags.Public ); ! } catch (Exception e) { throw new AssertionFailure("Could not find Object.Equals()", e); } --- 3,27 ---- using NHibernate.Type; ! namespace NHibernate.Util ! { ! public sealed class ReflectHelper ! { ! //TODO: this dependency is kind of bad - H2.0.3 comment ! private static readonly Property.BasicPropertyAccessor basicPropertyAccessor = new Property.BasicPropertyAccessor(); ! private static System.Type[] NoClasses = new System.Type[0]; private static System.Type[] Object = new System.Type[] { typeof(object) }; private static MethodInfo ObjectEquals; ! static ReflectHelper() ! { MethodInfo eq; ! try ! { eq = typeof(object).GetMethod("Equals", BindingFlags.Instance | BindingFlags.Public ); ! } ! catch (Exception e) ! { throw new AssertionFailure("Could not find Object.Equals()", e); } *************** *** 69,77 **** } ! public static bool OverridesEquals(System.Type clazz) { MethodInfo equals; ! try { equals = clazz.GetMethod("Equals"); ! } catch (Exception) { return false; } --- 29,41 ---- } ! public static bool OverridesEquals(System.Type clazz) ! { MethodInfo equals; ! try ! { equals = clazz.GetMethod("Equals"); ! } ! catch (Exception) ! { return false; } *************** *** 79,136 **** } ! public static Setter GetSetter(System.Type type, string propertyName) { ! Setter result = GetSetterOrNull(type, propertyName); ! if (result==null) throw new PropertyNotFoundException( "Could not find a setter for property " + propertyName + " in class " + type.FullName ); ! return result; ! } ! ! private static Setter GetSetterOrNull(System.Type type, string propertyName) { ! if (type == typeof(object) || type == null) return null; ! ! //PropertyInfo property = type.GetProperty(propertyName); ! PropertyInfo property = type.GetProperty(propertyName, BindingFlags.Instance|BindingFlags.Public|BindingFlags.NonPublic|BindingFlags.DeclaredOnly); ! ! if (property != null) { ! return new Setter(type, property, propertyName); ! } else { ! Setter setter = GetSetterOrNull( type.BaseType, propertyName ); ! if (setter == null) { ! System.Type[] interfaces = type.GetInterfaces(); ! for ( int i=0; setter==null && i<interfaces.Length; i++) { ! setter = GetSetterOrNull(interfaces[i], propertyName); ! } ! } ! return setter; } } ! public static Getter GetGetter(System.Type theClass, string propertyName) { ! Getter result = GetGetterOrNull(theClass, propertyName); ! if (result == null) throw new PropertyNotFoundException( "Could not find a setter for property " + propertyName + " in class " + theClass.FullName ); ! return result; ! } ! ! private static Getter GetGetterOrNull(System.Type type, string propertyName) { ! if (type==typeof(object) || type==null) return null; ! ! //PropertyInfo property = type.GetProperty(propertyName); ! PropertyInfo property = type.GetProperty(propertyName, BindingFlags.Instance|BindingFlags.Public|BindingFlags.NonPublic|BindingFlags.DeclaredOnly); ! ! if (property != null) { ! return new Getter(type, property, propertyName); ! } else { ! Getter getter = GetGetterOrNull( type.BaseType, propertyName ); ! if (getter == null) { ! System.Type[] interfaces = type.GetInterfaces(); ! for (int i=0; getter==null && i<interfaces.Length; i++) { ! getter = GetGetterOrNull( interfaces[i], propertyName ); ! } ! } ! return getter; ! } - } ! public static IType ReflectedPropertyType(System.Type theClass, string name) { return TypeFactory.HueristicType( GetGetter(theClass, name).ReturnType.Name ); } --- 43,67 ---- } ! //TODO: most calls to this will be replaced by the Mapping.Property.GetGetter() but ! // there will still be a call from hql into this. ! public static Property.IGetter GetGetter(System.Type theClass, string propertyName) ! { ! try ! { ! return basicPropertyAccessor.GetGetter(theClass, propertyName); ! } ! catch (PropertyNotFoundException pnfe) ! { ! //TODO: figure out how we are going to know the field accessor to use here... ! throw pnfe; } } ! //TODO: add a method in here ReflectedPropertyClass and replace most calls to GetGetter ! // with calls to it ! public static IType ReflectedPropertyType(System.Type theClass, string name) ! { return TypeFactory.HueristicType( GetGetter(theClass, name).ReturnType.Name ); } *************** *** 141,170 **** /// <param name="name">The name of the class. Can be a name with the assembly included or just the name of the class.</param> /// <returns>The Type for the Class.</returns> ! public static System.Type ClassForName(string name) { return System.Type.GetType(name, true); } ! public static object GetConstantValue(string name) { System.Type clazz; ! try { clazz = ClassForName( StringHelper.Qualifier(name) ); ! } catch(Exception) { return null; } ! try { return clazz.GetProperty( StringHelper.Unqualify(name) ).GetValue(null, new object[0]); //?? ! } catch (Exception) { return null; } } ! public static ConstructorInfo GetDefaultConstructor(System.Type type) { if (IsAbstractClass(type)) return null; ! try { ConstructorInfo contructor = type.GetConstructor(BindingFlags.Instance|BindingFlags.Public|BindingFlags.NonPublic, null, CallingConventions.HasThis, NoClasses, null); return contructor; ! } catch (Exception) { throw new PropertyNotFoundException( "Object class " + type.FullName + " must declare a default (no-arg) constructor" --- 72,113 ---- /// <param name="name">The name of the class. Can be a name with the assembly included or just the name of the class.</param> /// <returns>The Type for the Class.</returns> ! public static System.Type ClassForName(string name) ! { return System.Type.GetType(name, true); } ! public static object GetConstantValue(string name) ! { System.Type clazz; ! try ! { clazz = ClassForName( StringHelper.Qualifier(name) ); ! } ! catch(Exception) ! { return null; } ! try ! { return clazz.GetProperty( StringHelper.Unqualify(name) ).GetValue(null, new object[0]); //?? ! } ! catch (Exception) ! { return null; } } ! public static ConstructorInfo GetDefaultConstructor(System.Type type) ! { if (IsAbstractClass(type)) return null; ! try ! { ConstructorInfo contructor = type.GetConstructor(BindingFlags.Instance|BindingFlags.Public|BindingFlags.NonPublic, null, CallingConventions.HasThis, NoClasses, null); return contructor; ! } ! catch (Exception) ! { throw new PropertyNotFoundException( "Object class " + type.FullName + " must declare a default (no-arg) constructor" *************** *** 173,177 **** } ! public static bool IsAbstractClass(System.Type type) { return (type.IsAbstract || type.IsInterface); } --- 116,121 ---- } ! public static bool IsAbstractClass(System.Type type) ! { return (type.IsAbstract || type.IsInterface); } |
From: Michael D. <mik...@us...> - 2004-08-22 06:25:23
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32009/NHibernate/Impl Modified Files: QueryImpl.cs Log Message: Added code to use IGetter and ISetter Index: QueryImpl.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl/QueryImpl.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** QueryImpl.cs 20 Aug 2004 15:32:48 -0000 1.13 --- QueryImpl.cs 22 Aug 2004 06:25:06 -0000 1.14 *************** *** 324,328 **** foreach(string namedParam in session.Factory.GetNamedParameters(queryString)) { try { ! ReflectHelper.Getter getter = ReflectHelper.GetGetter(clazz, namedParam); SetParameter( namedParam, getter.Get(bean), GuessType( getter.ReturnType ) ); } catch (Exception) {} --- 324,328 ---- foreach(string namedParam in session.Factory.GetNamedParameters(queryString)) { try { ! Property.IGetter getter = ReflectHelper.GetGetter(clazz, namedParam); SetParameter( namedParam, getter.Get(bean), GuessType( getter.ReturnType ) ); } catch (Exception) {} |
From: Michael D. <mik...@us...> - 2004-08-22 06:24:43
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Type In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31809/NHibernate/Type Modified Files: ComponentType.cs Log Message: Added code to use IGetter and ISetter Index: ComponentType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/ComponentType.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ComponentType.cs 6 May 2004 13:14:03 -0000 1.8 --- ComponentType.cs 22 Aug 2004 06:24:26 -0000 1.9 *************** *** 17,22 **** private ConstructorInfo contructor; private IType[] types; ! private ReflectHelper.Getter[] getters; ! private ReflectHelper.Setter[] setters; private string[] propertyNames; private int propertySpan; --- 17,22 ---- private ConstructorInfo contructor; private IType[] types; ! private Property.IGetter[] getters; ! private Property.ISetter[] setters; private string[] propertyNames; private int propertySpan; *************** *** 24,28 **** private OuterJoinLoaderType[] joinedFetch; private string parentProperty; ! private ReflectHelper.Setter parentSetter; public override SqlType[] SqlTypes(IMapping mapping) { --- 24,30 ---- private OuterJoinLoaderType[] joinedFetch; private string parentProperty; ! private Property.ISetter parentSetter; ! //TODO: This is new... ! private Property.IGetter parentGetter; public override SqlType[] SqlTypes(IMapping mapping) { *************** *** 49,52 **** --- 51,57 ---- public ComponentType(System.Type componentClass, string[] properties, + Property.IGetter[] propertyGetters, + Property.ISetter[] propertySetters, + bool foundCustomAcessor, IType[] types, OuterJoinLoaderType[] joinedFetch, *************** *** 59,75 **** this.types = types; propertySpan = properties.Length; ! getters = new ReflectHelper.Getter[propertySpan]; ! setters = new ReflectHelper.Setter[propertySpan]; string[] getterNames = new string[propertySpan]; string[] setterNames = new string[propertySpan]; System.Type[] propTypes = new System.Type[propertySpan]; ! for (int i=0; i<propertySpan; i++) { ! getters[i] = ReflectHelper.GetGetter( componentClass, properties[i] ); ! setters[i] = ReflectHelper.GetSetter( componentClass, properties[i] ); getterNames[i] = getters[i].Property.Name; setterNames[i] = setters[i].Property.Name; propTypes[i] = getters[i].Property.PropertyType; } ! this.parentSetter = (parentProperty==null) ? null : ReflectHelper.GetSetter(componentClass, parentProperty); this.parentProperty = parentProperty; this.propertyNames = properties; --- 64,90 ---- this.types = types; propertySpan = properties.Length; ! getters = propertyGetters; ! setters = propertySetters; string[] getterNames = new string[propertySpan]; string[] setterNames = new string[propertySpan]; System.Type[] propTypes = new System.Type[propertySpan]; ! for (int i=0; i<propertySpan; i++) ! { getterNames[i] = getters[i].Property.Name; setterNames[i] = setters[i].Property.Name; propTypes[i] = getters[i].Property.PropertyType; } ! ! if(parentProperty==null) ! { ! parentSetter = null; ! parentGetter = null; ! } ! else ! { ! Property.IPropertyAccessor pa = Property.PropertyAccessorFactory.GetPropertyAccessor(null); ! parentSetter = pa.GetSetter( componentClass, parentProperty ); ! parentGetter = pa.GetGetter( componentClass, parentProperty ); ! } this.parentProperty = parentProperty; this.propertyNames = properties; |
From: Michael D. <mik...@us...> - 2004-08-22 06:24:42
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Cfg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31809/NHibernate/Cfg Modified Files: Binder.cs Mappings.cs Log Message: Added code to use IGetter and ISetter Index: Mappings.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Cfg/Mappings.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Mappings.cs 16 Aug 2004 05:07:45 -0000 1.7 --- Mappings.cs 22 Aug 2004 06:24:26 -0000 1.8 *************** *** 21,24 **** --- 21,25 ---- private string defaultCascade; private bool autoImport; + private string defaultAccess; internal Mappings(IDictionary classes, IDictionary collections, IDictionary tables, IDictionary queries, IDictionary imports, IList secondPasses) *************** *** 94,119 **** 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) { --- 95,113 ---- public string SchemaName { ! get { return schemaName; } ! set { schemaName = value; } } public string DefaultCascade { ! get { return defaultCascade; } ! set { defaultCascade = value; } } + public string DefaultAccess + { + get { return defaultAccess; } + set { defaultAccess = value; } + } public void AddQuery(string name, string query) { Index: Binder.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Cfg/Binder.cs,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** Binder.cs 19 Aug 2004 17:41:18 -0000 1.28 --- Binder.cs 22 Aug 2004 06:24:26 -0000 1.29 *************** *** 212,216 **** BindValue(subnode, id, false, propertyName); id.SetTypeByReflection( model.PersistentClazz, propertyName); ! Property prop = new Property(id); BindProperty(subnode, prop, mappings); model.IdentifierProperty = prop; --- 212,216 ---- BindValue(subnode, id, false, propertyName); id.SetTypeByReflection( model.PersistentClazz, propertyName); ! Mapping.Property prop = new Mapping.Property(id); BindProperty(subnode, prop, mappings); model.IdentifierProperty = prop; *************** *** 236,240 **** System.Type reflectedClass = ReflectHelper.GetGetter( model.PersistentClazz, propertyName ).ReturnType; BindComponent(subnode, compId, reflectedClass, model.Name + StringHelper.Dot + propertyName, false, mappings); ! Property prop = new Property(compId); BindProperty(subnode, prop, mappings); model.IdentifierProperty = prop; --- 236,240 ---- System.Type reflectedClass = ReflectHelper.GetGetter( model.PersistentClazz, propertyName ).ReturnType; BindComponent(subnode, compId, reflectedClass, model.Name + StringHelper.Dot + propertyName, false, mappings); ! Mapping.Property prop = new Mapping.Property(compId); BindProperty(subnode, prop, mappings); model.IdentifierProperty = prop; *************** *** 249,253 **** BindValue(subnode, val, false, propertyName); if ( val.Type==null ) val.Type = ( ("version".Equals(name)) ? NHibernate.Int32 : NHibernate.Timestamp ); ! Property timestampProp = new Property(val); BindProperty(subnode, timestampProp, mappings); model.Version = timestampProp; --- 249,253 ---- BindValue(subnode, val, false, propertyName); if ( val.Type==null ) val.Type = ( ("version".Equals(name)) ? NHibernate.Int32 : NHibernate.Timestamp ); ! Mapping.Property timestampProp = new Mapping.Property(val); BindProperty(subnode, timestampProp, mappings); model.Version = timestampProp; *************** *** 368,372 **** } ! public static void BindProperty(XmlNode node, Property model, Mappings mappings) { model.Name = GetPropertyName(node); --- 368,372 ---- } ! public static void BindProperty(XmlNode node, Mapping.Property model, Mappings mappings) { model.Name = GetPropertyName(node); *************** *** 374,377 **** --- 374,386 ---- if (type==null) throw new MappingException("could not determine a property type for: " + model.Name ); + XmlAttribute accessNode = node.Attributes["access"]; + if( accessNode!=null) + { + model.PropertyAccessorName = accessNode.Value; + } + else + { + model.PropertyAccessorName = mappings.DefaultAccess; + } XmlAttribute cascadeNode = node.Attributes["cascade"]; model.Cascade = (cascadeNode==null) ? mappings.DefaultCascade : cascadeNode.Value; *************** *** 784,788 **** if (componentClass!=null) value.SetTypeByReflection(componentClass, propertyName); value.CreateForeignKey(); ! Property prop = new Property(value); BindProperty(subnode, prop, mappings); model.AddProperty(prop); --- 793,797 ---- if (componentClass!=null) value.SetTypeByReflection(componentClass, propertyName); value.CreateForeignKey(); ! Mapping.Property prop = new Mapping.Property(value); BindProperty(subnode, prop, mappings); model.AddProperty(prop); *************** *** 795,801 **** Cascades.CascadeStyle[] cascade = new Cascades.CascadeStyle[span]; OuterJoinLoaderType[] joinedFetch = new OuterJoinLoaderType[span]; int i=0; ! foreach(Property prop in model.PropertyCollection) { names[i] = prop.Name; --- 804,813 ---- Cascades.CascadeStyle[] cascade = new Cascades.CascadeStyle[span]; OuterJoinLoaderType[] joinedFetch = new OuterJoinLoaderType[span]; + Property.IGetter[] getters = new Property.IGetter[span]; + Property.ISetter[] setters = new Property.ISetter[span]; + bool foundCustomAccessor = false; int i=0; ! foreach(Mapping.Property prop in model.PropertyCollection) { names[i] = prop.Name; *************** *** 805,814 **** //skiping dynaprops //TODO: Dynaprops i++; } - model.Type = ! (IType) new ComponentType( model.ComponentClass, names, types, joinedFetch, cascade, model.ParentProperty, model.IsEmbedded ); } --- 817,831 ---- //skiping dynaprops //TODO: Dynaprops + + // the setters is new code added for field access + setters[i] = prop.GetSetter( model.ComponentClass ); + getters[i] = prop.GetGetter( model.ComponentClass ); + if( !prop.IsBasicPropertyAccessor ) foundCustomAccessor = true; i++; } + //TODO: resume here with adding setters and getters model.Type = ! (IType) new ComponentType( model.ComponentClass, names, getters, setters, foundCustomAccessor, types, joinedFetch, cascade, model.ParentProperty, model.IsEmbedded ); } *************** *** 970,974 **** value.SetTypeByReflection( model.PersistentClazz, propertyName ); value.CreateForeignKey(); ! Property prop = new Property(value); BindProperty(subnode, prop, mappings); model.AddProperty(prop); --- 987,991 ---- value.SetTypeByReflection( model.PersistentClazz, propertyName ); value.CreateForeignKey(); ! Mapping.Property prop = new Mapping.Property(value); BindProperty(subnode, prop, mappings); model.AddProperty(prop); *************** *** 1147,1151 **** XmlAttribute dcNode = hmNode.Attributes["default-cascade"]; model.DefaultCascade = (dcNode==null) ? "none" : dcNode.Value ; ! XmlAttribute aiNode = hmNode.Attributes["auto-import"]; model.IsAutoImport = (aiNode==null) ? true : "true".Equals( aiNode.Value ); --- 1164,1169 ---- XmlAttribute dcNode = hmNode.Attributes["default-cascade"]; model.DefaultCascade = (dcNode==null) ? "none" : dcNode.Value ; ! XmlAttribute daNode = hmNode.Attributes["default-access"]; ! model.DefaultAccess = (daNode==null) ? "property" : daNode.Value; XmlAttribute aiNode = hmNode.Attributes["auto-import"]; model.IsAutoImport = (aiNode==null) ? true : "true".Equals( aiNode.Value ); |
From: Michael D. <mik...@us...> - 2004-08-22 06:23:58
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31592/NHibernate/Persister Modified Files: AbstractEntityPersister.cs EntityPersister.cs NormalizedEntityPersister.cs Log Message: Added code to use IGetter and ISetter Index: NormalizedEntityPersister.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister/NormalizedEntityPersister.cs,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** NormalizedEntityPersister.cs 19 Aug 2004 17:51:03 -0000 1.26 --- NormalizedEntityPersister.cs 22 Aug 2004 06:23:40 -0000 1.27 *************** *** 284,288 **** int propertyIndex = 0; ! foreach(Property prop in model.PropertyClosureCollection) { thisClassProperties.Add(prop, thisClassPropertiesObject); --- 284,288 ---- int propertyIndex = 0; ! foreach(Mapping.Property prop in model.PropertyClosureCollection) { thisClassProperties.Add(prop, thisClassPropertiesObject); *************** *** 315,319 **** Hashtable distinctColumns = new Hashtable(); CheckColumnDuplication(distinctColumns, model.Key.ColumnCollection); ! foreach(Property prop in model.PropertyCollection) { if(prop.IsUpdateable || prop.IsInsertable) --- 315,319 ---- Hashtable distinctColumns = new Hashtable(); CheckColumnDuplication(distinctColumns, model.Key.ColumnCollection); ! foreach(Mapping.Property prop in model.PropertyCollection) { if(prop.IsUpdateable || prop.IsInsertable) *************** *** 335,339 **** ArrayList definedBySubclass = new ArrayList(); // this.propertyDefinedOnSubclass ! foreach(Property prop in model.SubclassPropertyClosureCollection) { names.Add(prop.Name); --- 335,339 ---- ArrayList definedBySubclass = new ArrayList(); // this.propertyDefinedOnSubclass ! foreach(Mapping.Property prop in model.SubclassPropertyClosureCollection) { names.Add(prop.Name); Index: AbstractEntityPersister.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister/AbstractEntityPersister.cs,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** AbstractEntityPersister.cs 16 Aug 2004 05:22:56 -0000 1.20 --- AbstractEntityPersister.cs 22 Aug 2004 06:23:40 -0000 1.21 *************** *** 70,75 **** [NonSerialized] private string identifierPropertyName; [NonSerialized] private IType identifierType; ! [NonSerialized] private ReflectHelper.Setter identifierSetter; ! [NonSerialized] private ReflectHelper.Getter identifierGetter; [NonSerialized] private PropertyInfo proxyIdentifierProperty; --- 70,75 ---- [NonSerialized] private string identifierPropertyName; [NonSerialized] private IType identifierType; ! [NonSerialized] private Property.ISetter identifierSetter; ! [NonSerialized] private Property.IGetter identifierGetter; [NonSerialized] private PropertyInfo proxyIdentifierProperty; *************** *** 82,90 **** [NonSerialized] private string versionColumnName; [NonSerialized] private IVersionType versionType; ! [NonSerialized] private ReflectHelper.Getter versionGetter; [NonSerialized] private int versionProperty; ! [NonSerialized] private ReflectHelper.Getter[] getters; ! [NonSerialized] private ReflectHelper.Setter[] setters; [NonSerialized] private readonly Hashtable gettersByPropertyName = new Hashtable(); [NonSerialized] private readonly Hashtable settersByPropertyName = new Hashtable(); --- 82,90 ---- [NonSerialized] private string versionColumnName; [NonSerialized] private IVersionType versionType; ! [NonSerialized] private Property.IGetter versionGetter; [NonSerialized] private int versionProperty; ! [NonSerialized] private Property.IGetter[] getters; ! [NonSerialized] private Property.ISetter[] setters; [NonSerialized] private readonly Hashtable gettersByPropertyName = new Hashtable(); [NonSerialized] private readonly Hashtable settersByPropertyName = new Hashtable(); *************** *** 248,257 **** } ! protected virtual ReflectHelper.Setter[] Setters { get { return setters; } } ! protected virtual ReflectHelper.Getter[] Getters { get { return getters; } --- 248,257 ---- } ! protected virtual Property.ISetter[] Setters { get { return setters; } } ! protected virtual Property.IGetter[] Getters { get { return getters; } *************** *** 451,471 **** hasEmbeddedIdentifier = model.HasEmbeddedIdentifier; - identifierPropertyName = model.HasIdentifierProperty ? model.IdentifierProperty.Name : null; Value idValue = model.Identifier; identifierType = idValue.Type; ! if (identifierPropertyName!=null) { ! identifierSetter = ReflectHelper.GetSetter(mappedClass, identifierPropertyName); ! identifierGetter = ReflectHelper.GetGetter(mappedClass, identifierPropertyName); ! ! PropertyInfo proxyGetter = identifierGetter.Property; ! try ! { ! System.Type proxy = model.ProxyInterface; ! if(proxy != null) proxyGetter = ReflectHelper.GetGetter( proxy, identifierPropertyName ).Property; ! } ! catch (Exception) {} ! proxyIdentifierProperty = proxyGetter; } else --- 451,463 ---- hasEmbeddedIdentifier = model.HasEmbeddedIdentifier; Value idValue = model.Identifier; identifierType = idValue.Type; ! if (model.HasIdentifierProperty) { ! Mapping.Property idProperty = model.IdentifierProperty; ! identifierPropertyName = idProperty.Name; ! identifierSetter = idProperty.GetSetter(mappedClass); ! identifierGetter = idProperty.GetGetter(mappedClass); } else *************** *** 476,479 **** --- 468,500 ---- } + //this code has been modified to be more like h2.1 because of IGetter + // and ISetter + System.Type prox = model.ProxyInterface; + PropertyInfo proxySetIdentifierMethod = null; + PropertyInfo proxyGetIdentifierMethod = null; + + if( model.HasIdentifierProperty && prox!=null) + { + Mapping.Property idProperty = model.IdentifierProperty; + + try + { + proxyGetIdentifierMethod = idProperty.GetGetter(prox).Property; + } + catch (PropertyNotFoundException) + { + } + + try + { + proxySetIdentifierMethod = idProperty.GetSetter(prox).Property; + } + catch (PropertyNotFoundException) + { + } + } + + proxyIdentifierProperty = proxyGetIdentifierMethod; + // HYDRATE SPAN *************** *** 546,550 **** versionPropertyName = model.Version.Name; versioned = true; ! versionGetter = ReflectHelper.GetGetter(mappedClass, versionPropertyName); // TODO: determine if this block is kept // this if-else block is extra logic in nhibernate - not sure if I like it - would rather throw --- 567,571 ---- versionPropertyName = model.Version.Name; versioned = true; ! versionGetter = model.Version.GetGetter(mappedClass); // TODO: determine if this block is kept // this if-else block is extra logic in nhibernate - not sure if I like it - would rather throw *************** *** 577,582 **** propertyUpdateability = new bool[hydrateSpan]; propertyInsertability = new bool[hydrateSpan]; ! getters = new ReflectHelper.Getter[hydrateSpan]; ! setters = new ReflectHelper.Setter[hydrateSpan]; cascadeStyles = new Cascades.CascadeStyle[hydrateSpan]; string[] setterNames = new string[hydrateSpan]; --- 598,603 ---- propertyUpdateability = new bool[hydrateSpan]; propertyInsertability = new bool[hydrateSpan]; ! getters = new Property.IGetter[hydrateSpan]; ! setters = new Property.ISetter[hydrateSpan]; cascadeStyles = new Cascades.CascadeStyle[hydrateSpan]; string[] setterNames = new string[hydrateSpan]; *************** *** 588,597 **** bool foundCascade = false; ! foreach(Property prop in model.PropertyClosureCollection) { if (prop==model.Version) tempVersionProperty = i; propertyNames[i] = prop.Name; ! getters[i] = ReflectHelper.GetGetter( mappedClass, propertyNames[i] ); ! setters[i] = ReflectHelper.GetSetter( mappedClass, propertyNames[i] ); getterNames[i] = getters[i].Property.Name; setterNames[i] = setters[i].Property.Name; --- 609,618 ---- bool foundCascade = false; ! foreach(Mapping.Property prop in model.PropertyClosureCollection) { if (prop==model.Version) tempVersionProperty = i; propertyNames[i] = prop.Name; ! getters[i] = prop.GetGetter( mappedClass ); ! setters[i] = prop.GetSetter( mappedClass ); getterNames[i] = getters[i].Property.Name; setterNames[i] = setters[i].Property.Name; *************** *** 713,717 **** public virtual object GetPropertyValue(object obj, string propertyName) { ! ReflectHelper.Getter getter = (ReflectHelper.Getter) gettersByPropertyName[propertyName]; if(getter==null) throw new HibernateException("unmapped property: " + propertyName); return getter.Get(obj); --- 734,738 ---- public virtual object GetPropertyValue(object obj, string propertyName) { ! Property.IGetter getter = (Property.IGetter) gettersByPropertyName[propertyName]; if(getter==null) throw new HibernateException("unmapped property: " + propertyName); return getter.Get(obj); *************** *** 720,724 **** public virtual void SetPropertyValue(object obj, string propertyName, object value) { ! ReflectHelper.Setter setter = (ReflectHelper.Setter) settersByPropertyName[propertyName]; if(setter==null) throw new HibernateException("unmapped property: " + propertyName); setter.Set(obj, value); --- 741,745 ---- public virtual void SetPropertyValue(object obj, string propertyName, object value) { ! Property.ISetter setter = (Property.ISetter ) settersByPropertyName[propertyName]; if(setter==null) throw new HibernateException("unmapped property: " + propertyName); setter.Set(obj, value); Index: EntityPersister.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister/EntityPersister.cs,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** EntityPersister.cs 16 Aug 2004 05:30:59 -0000 1.23 --- EntityPersister.cs 22 Aug 2004 06:23:40 -0000 1.24 *************** *** 144,148 **** int i=0; bool foundColumn = false; ! foreach(Property prop in model.PropertyClosureCollection) { thisClassProperties.Add(prop); --- 144,148 ---- int i=0; bool foundColumn = false; ! foreach(Mapping.Property prop in model.PropertyClosureCollection) { thisClassProperties.Add(prop); *************** *** 193,197 **** ArrayList definedBySubclass = new ArrayList(); ! foreach(Property prop in model.SubclassPropertyClosureCollection) { names.Add( prop.Name ); --- 193,197 ---- ArrayList definedBySubclass = new ArrayList(); ! foreach(Mapping.Property prop in model.SubclassPropertyClosureCollection) { names.Add( prop.Name ); |
From: Michael D. <mik...@us...> - 2004-08-22 06:22:24
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Mapping In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31234/NHibernate/Mapping Modified Files: Property.cs Log Message: Added properties and methods for determining the access method. Index: Property.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Mapping/Property.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Property.cs 23 Jun 2004 21:02:17 -0000 1.7 --- Property.cs 22 Aug 2004 06:22:13 -0000 1.8 *************** *** 1,6 **** using System; using System.Collections; ! using NHibernate.Type; using NHibernate.Engine; namespace NHibernate.Mapping --- 1,8 ---- using System; using System.Collections; ! using NHibernate.Engine; + using NHibernate.Type; + using NHibernate.Property; namespace NHibernate.Mapping *************** *** 13,16 **** --- 15,19 ---- private bool updateable; private bool insertable; + private string propertyAccessorName; public Property(Value propertyValue) *************** *** 122,125 **** --- 125,154 ---- get { return Formula!=null; } } + + public string PropertyAccessorName + { + get { return propertyAccessorName; } + set { propertyAccessorName = value; } + } + + public IGetter GetGetter(System.Type clazz) + { + return PropertyAccessor.GetGetter(clazz, name); + } + + public ISetter GetSetter(System.Type clazz) + { + return PropertyAccessor.GetSetter(clazz, name); + } + + protected IPropertyAccessor PropertyAccessor + { + get { return PropertyAccessorFactory.GetPropertyAccessor( PropertyAccessorName ); } + } + + public bool IsBasicPropertyAccessor + { + get { return propertyAccessorName==null || propertyAccessorName.Equals("property"); } + } } } \ No newline at end of file |
From: Michael D. <mik...@us...> - 2004-08-22 06:21:08
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30859/NHibernate Modified Files: nhibernate-mapping-2.0.xsd Log Message: Added "access" attribute to elements that can use it. Index: nhibernate-mapping-2.0.xsd =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/nhibernate-mapping-2.0.xsd,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** nhibernate-mapping-2.0.xsd 13 Aug 2004 18:53:39 -0000 1.5 --- nhibernate-mapping-2.0.xsd 22 Aug 2004 06:20:50 -0000 1.6 *************** *** 27,30 **** --- 27,37 ---- </xs:simpleType> </xs:attribute> + <xs:attribute name='default-access' default='property'> + <xs:annotation> + <xs:documentation> + Can specify how the default access to Get/Set the values for the property + </xs:documentation> + </xs:annotation> + </xs:attribute> <xs:attribute name='auto-import' default='true'> <xs:simpleType> *************** *** 161,164 **** --- 168,172 ---- </xs:sequence> <xs:attribute name='name' /> + <xs:attribute name='access' /> <xs:attribute name='column' /> <xs:attribute name='type' /> *************** *** 188,191 **** --- 196,200 ---- <xs:attribute name='class' /> <xs:attribute name='name' /> + <xs:attribute name='access' /> <xs:attribute name='unsaved-value' default='none'> <xs:simpleType> *************** *** 243,246 **** --- 252,256 ---- <xs:complexType> <xs:attribute name='name' use='required' /> + <xs:attribute name='access' /> <xs:attribute name='column' /> <xs:attribute name='type' default='Int32' /> *************** *** 255,258 **** --- 265,269 ---- <xs:complexType> <xs:attribute name='name' use='required' /> + <xs:attribute name='access' /> <xs:attribute name='column' /> </xs:complexType> *************** *** 382,385 **** --- 393,397 ---- </xs:sequence> <xs:attribute name='name' use='required' /> + <xs:attribute name='access' /> <xs:attribute name='type' /> <xs:attribute name='column' /> *************** *** 445,448 **** --- 457,461 ---- <xs:attribute name='meta-type' /> <xs:attribute name='name' use='required' /> + <xs:attribute name='access' /> <xs:attribute name='cascade' default='none'> <xs:simpleType> *************** *** 472,475 **** --- 485,489 ---- </xs:sequence> <xs:attribute name='name' use='required' /> + <xs:attribute name='access' /> <xs:attribute name='table' /> <xs:attribute name='schema' /> *************** *** 504,507 **** --- 518,522 ---- </xs:sequence> <xs:attribute name='name' use='required' /> + <xs:attribute name='access' /> <xs:attribute name='table' /> <xs:attribute name='schema' /> *************** *** 594,597 **** --- 609,613 ---- <xs:attribute name='class' /> <xs:attribute name='name' use='required' /> + <xs:attribute name='access' /> <xs:attribute name='update' default='true'> <xs:simpleType> *************** *** 685,688 **** --- 701,705 ---- </xs:sequence> <xs:attribute name='name' use='required' /> + <xs:attribute name='access' /> <xs:attribute name='table' /> <xs:attribute name='schema' /> *************** *** 766,769 **** --- 783,787 ---- </xs:sequence> <xs:attribute name='name' use='required' /> + <xs:attribute name='access' /> <xs:attribute name='class' /> <xs:attribute name='column' /> *************** *** 776,779 **** --- 794,798 ---- </xs:sequence> <xs:attribute name='name' use='required' /> + <xs:attribute name='access' /> <xs:attribute name='type' /> <xs:attribute name='column' /> *************** *** 797,800 **** --- 816,820 ---- </xs:sequence> <xs:attribute name='name' use='required' /> + <xs:attribute name='access' /> <xs:attribute name='table' /> <xs:attribute name='schema' /> *************** *** 865,868 **** --- 885,889 ---- </xs:sequence> <xs:attribute name='name' use='required' /> + <xs:attribute name='access' /> <xs:attribute name='class' /> <xs:attribute name='column' /> *************** *** 941,944 **** --- 962,966 ---- </xs:sequence> <xs:attribute name='name' use='required' /> + <xs:attribute name='access' /> <xs:attribute name='table' /> <xs:attribute name='schema' /> *************** *** 1000,1003 **** --- 1022,1026 ---- <xs:attribute name='class' use='required' /> <xs:attribute name='name' use='required' /> + <xs:attribute name='access' /> </xs:complexType> </xs:element> *************** *** 1013,1016 **** --- 1036,1040 ---- </xs:sequence> <xs:attribute name='name' use='required' /> + <xs:attribute name='access' /> <xs:attribute name='class' /> <xs:attribute name='cascade'> *************** *** 1063,1066 **** --- 1087,1091 ---- </xs:sequence> <xs:attribute name='name' use='required' /> + <xs:attribute name='access' /> <xs:attribute name='table' /> <xs:attribute name='schema' /> *************** *** 1088,1091 **** --- 1113,1117 ---- </xs:sequence> <xs:attribute name='name' use='required' /> + <xs:attribute name='access' /> <xs:attribute name='table' /> <xs:attribute name='schema' /> |
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/PropertyTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30550/NHibernate.Test/PropertyTest Added Files: FieldAccessorFixture.cs FieldClass.cs FieldMUnderscorePrefixAccessorFixture.cs FieldUnderscorePrefixAccessorFixture.cs Log Message: Added some small tests for field access methods. --- NEW FILE: FieldAccessorFixture.cs --- using System; using NHibernate.Property; using NUnit.Framework; namespace NHibernate.Test.PropertyTest { /// <summary> /// Base test fixture for the Field Accessors. /// </summary> [TestFixture] public class FieldAccessorFixture { protected IPropertyAccessor _accessor; protected IGetter _getter; protected ISetter _setter; protected FieldClass _instance; /// <summary> /// SetUp the local fields for the test cases. /// </summary> /// <remarks> /// Any classes testing out their field access should override this /// and setup their FieldClass instance so that whichever field is /// going to be reflected upon is initialized to 0. /// </remarks> [SetUp] public virtual void SetUp() { _accessor = new FieldAccessor(); _getter = _accessor.GetGetter( typeof(FieldClass), "Id" ); _setter = _accessor.GetSetter( typeof(FieldClass), "Id" ); _instance = new FieldClass(6, -1, 0); } [Test] public void GetValue() { Assert.AreEqual( 0, _getter.Get(_instance) ); _instance.Increment(); Assert.AreEqual( 1, _getter.Get(_instance) ); } [Test] public void SetValue() { Assert.AreEqual( 0, _getter.Get(_instance) ); _setter.Set( _instance, 5 ); Assert.AreEqual( 5, _getter.Get(_instance) ); } } } --- NEW FILE: FieldClass.cs --- using System; namespace NHibernate.Test.PropertyTest { /// <summary> /// Summary description for FieldClass. /// </summary> public class FieldClass { private int _id; private int m_id; private int id; public FieldClass( int underscoreId, int mUnderscoreId, int Id ) { _id = underscoreId; m_id = mUnderscoreId; id = Id; } public void Increment() { _id++; m_id++; id++; } } } --- NEW FILE: FieldUnderscorePrefixAccessorFixture.cs --- using System; using NHibernate.Property; using NUnit.Framework; namespace NHibernate.Test.PropertyTest { /// <summary> /// Summary description for FieldUnderscorePrefixAccessorFixture. /// </summary> [TestFixture] public class FieldUnderscorePrefixAccessorFixture : FieldAccessorFixture { [SetUp] public override void SetUp() { _accessor = new FieldUnderscorePrefixAccessor(); _getter = _accessor.GetGetter( typeof(FieldClass), "Id" ); _setter = _accessor.GetSetter( typeof(FieldClass), "Id" ); _instance = new FieldClass( 0 , -4, 3 ); } } } --- NEW FILE: FieldMUnderscorePrefixAccessorFixture.cs --- using System; using NHibernate.Property; using NUnit.Framework; namespace NHibernate.Test.PropertyTest { /// <summary> /// Summary description for FieldMUnderscorePrefixAccessorFixture. /// </summary> [TestFixture] public class FieldMUnderscorePrefixAccessorFixture : FieldAccessorFixture { [SetUp] public override void SetUp() { _accessor = new FieldMUnderscorePrefixAccessor(); _getter = _accessor.GetGetter( typeof(FieldClass), "Id" ); _setter = _accessor.GetSetter( typeof(FieldClass), "Id" ); _instance = new FieldClass( -12 , 0, 13); } } } |
From: Michael D. <mik...@us...> - 2004-08-22 06:19:56
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30550/NHibernate.Test Modified Files: NHibernate.Test-1.1.csproj Log Message: Added some small tests for field access methods. Index: NHibernate.Test-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHibernate.Test-1.1.csproj,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** NHibernate.Test-1.1.csproj 16 Aug 2004 05:14:40 -0000 1.33 --- NHibernate.Test-1.1.csproj 22 Aug 2004 06:19:45 -0000 1.34 *************** *** 357,360 **** --- 357,380 ---- /> <File + RelPath = "PropertyTest\FieldAccessorFixture.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "PropertyTest\FieldClass.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "PropertyTest\FieldMUnderscorePrefixAccessorFixture.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "PropertyTest\FieldUnderscorePrefixAccessorFixture.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "SqlCommandTest\SqlDeleteBuilderFixture.cs" SubType = "Code" |
From: Michael D. <mik...@us...> - 2004-08-22 06:19:04
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Property In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30320/NHibernate/Property Added Files: BasicGetter.cs BasicPropertyAccessor.cs BasicSetter.cs FieldAccessor.cs FieldGetter.cs FieldMUnderscorePrefixAccessor.cs FieldSetter.cs FieldUnderscorePrefixAccessor.cs IGetter.cs IPropertyAccessor.cs ISetter.cs PropertyAccessorFactory.cs Log Message: Classes need to make direct write to fields possible. --- NEW FILE: BasicPropertyAccessor.cs --- using System; using System.Reflection; namespace NHibernate.Property { /// <summary> /// Accesses property values via a get/set pair, which may be nonpublic. /// The default (and recommended strategy). /// </summary> public class BasicPropertyAccessor : IPropertyAccessor { private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(BasicPropertyAccessor)); #region IPropertyAccessor Members public ISetter GetSetter(System.Type type, string propertyName) { BasicSetter result = GetSetterOrNull(type, propertyName); if (result==null) throw new PropertyNotFoundException( "Could not find a setter for property " + propertyName + " in class " + type.FullName ); return result; } public IGetter GetGetter(System.Type theClass, string propertyName) { BasicGetter result = GetGetterOrNull(theClass, propertyName); if (result == null) throw new PropertyNotFoundException( "Could not find a setter for property " + propertyName + " in class " + theClass.FullName ); return result; } #endregion private static BasicSetter GetSetterOrNull(System.Type type, string propertyName) { if (type == typeof(object) || type == null) return null; //PropertyInfo property = type.GetProperty(propertyName); PropertyInfo property = type.GetProperty(propertyName, BindingFlags.Instance|BindingFlags.Public|BindingFlags.NonPublic|BindingFlags.DeclaredOnly); if (property != null) { return new BasicSetter(type, property, propertyName); } else { BasicSetter setter = GetSetterOrNull( type.BaseType, propertyName ); if (setter == null) { System.Type[] interfaces = type.GetInterfaces(); for ( int i=0; setter==null && i<interfaces.Length; i++) { setter = GetSetterOrNull(interfaces[i], propertyName); } } return setter; } } private static BasicGetter GetGetterOrNull(System.Type type, string propertyName) { if (type==typeof(object) || type==null) return null; //PropertyInfo property = type.GetProperty(propertyName); PropertyInfo property = type.GetProperty(propertyName, BindingFlags.Instance|BindingFlags.Public|BindingFlags.NonPublic|BindingFlags.DeclaredOnly); if (property != null) { return new BasicGetter(type, property, propertyName); } else { BasicGetter getter = GetGetterOrNull( type.BaseType, propertyName ); if (getter == null) { System.Type[] interfaces = type.GetInterfaces(); for (int i=0; getter==null && i<interfaces.Length; i++) { getter = GetGetterOrNull( interfaces[i], propertyName ); } } return getter; } } } } --- NEW FILE: FieldGetter.cs --- using System; using System.Reflection; namespace NHibernate.Property { public sealed class FieldGetter : IGetter { private readonly FieldInfo field; private readonly System.Type clazz; private readonly string name; public FieldGetter(FieldInfo field, System.Type clazz, string name) { this.field = field; this.clazz = clazz; this.name = name; } #region IGetter Members public object Get(object target) { try { return field.GetValue(target); } catch(Exception e) { throw new PropertyAccessException( e, "could not get a field value by reflection", false, clazz, name ); } } public System.Type ReturnType { get { return field.ReflectedType; } } public string PropertyName { get { return null; } } public PropertyInfo Property { get { return null; } } #endregion } } --- NEW FILE: IGetter.cs --- using System; using System.Reflection; namespace NHibernate.Property { /// <summary> /// Gets values of a particular property /// </summary> public interface IGetter { /// <summary> /// Get the property value from the given instance /// </summary> /// <param name="target"></param> /// <returns></returns> object Get(object target); /// <summary> /// Get the declared Type. /// </summary> /// <returns></returns> System.Type ReturnType{ get; } /// <summary> /// Optional operation (return null) /// </summary> /// <returns></returns> string PropertyName { get; } /// <summary> /// Optional operation (return null) /// </summary> /// <returns></returns> /// <remarks> /// This is used to tell the Proxy which getter to intercept as the <id> /// property. /// </remarks> PropertyInfo Property { get; } } } --- NEW FILE: FieldUnderscorePrefixAccessor.cs --- using System; namespace NHibernate.Property { /// <summary> /// Access fields directly. /// </summary> /// <remarks> /// This accesses fields with the following naming convention: /// Property Name = "Id" /// Field Name = "_id" /// </remarks> public class FieldUnderscorePrefixAccessor : FieldAccessor { /// <summary> /// Converts the Property's name into a Field name with the /// "_" prefixing the Property's name converted to camel style /// casing. /// </summary> /// <param name="propertyName">The name of the Property.</param> /// <returns>The name of the Field.</returns> /// <remarks> /// This uses the convention that a Property <c>Id</c> will have a field </c>_id</c> /// </remarks> protected override string GetFieldName(string propertyName) { return "_" + base.GetFieldName(propertyName) ; } } } --- NEW FILE: BasicGetter.cs --- using System; using System.Reflection; namespace NHibernate.Property { /// <summary> /// /// </summary> public sealed class BasicGetter : IGetter { private System.Type clazz; private PropertyInfo property; private string propertyName; public BasicGetter(System.Type clazz, PropertyInfo property, string propertyName) { this.clazz = clazz; this.property = property; this.propertyName = propertyName; } #region IGetter Members public object Get(object target) { try { return property.GetValue(target, new object[0]); } catch (Exception e) { throw new PropertyAccessException(e, "Exception occurred", false, clazz, propertyName); } } public System.Type ReturnType { get { return property.PropertyType; } } public string PropertyName { get { return property.Name; } } public PropertyInfo Property { get{ return property; } } #endregion } } --- NEW FILE: IPropertyAccessor.cs --- using System; namespace NHibernate.Property { /// <summary> /// Abstracts the notion of a "property". Defines a strategy for accessing the /// value of an attribute. /// </summary> public interface IPropertyAccessor { /// <summary> /// Create a "getter" for the named attribute /// </summary> /// <param name="theClass"></param> /// <param name="propertyName"></param> /// <returns></returns> /// <exception cref="PropertyNotFoundException" > /// </exception> IGetter GetGetter(System.Type theClass, string propertyName); /// <summary> /// Create a "setter" for the named attribute /// </summary> /// <param name="theClass"></param> /// <param name="propertyName"></param> /// <returns></returns> /// <exception cref="PropertyNotFoundException" > /// </exception> ISetter GetSetter(System.Type theClass, string propertyName); } } --- NEW FILE: FieldMUnderscorePrefixAccessor.cs --- using System; namespace NHibernate.Property { /// <summary> /// Access fields directly. /// </summary> /// <remarks> /// This accesses fields with the following naming convention: /// Property Name = "Id" /// Field Name = "m_id" /// </remarks> public class FieldMUnderscorePrefixAccessor : FieldAccessor { /// <summary> /// Converts the Property's name into a Field name with the /// "m_" prefixing the Property's name converted to camel style /// casing. /// </summary> /// <param name="propertyName">The name of the Property.</param> /// <returns>The name of the Field.</returns> /// <remarks> /// This uses the convention that a Property <c>Id</c> will have a field </c>m_id</c> /// </remarks> protected override string GetFieldName(string propertyName) { return "m_" + base.GetFieldName(propertyName) ; } } } --- NEW FILE: PropertyAccessorFactory.cs --- using System; using System.Reflection; using NHibernate.Util; namespace NHibernate.Property { /// <summary> /// Factory for creating the various PropertyAccessor strategies. /// </summary> public class PropertyAccessorFactory { private static readonly IPropertyAccessor basicPropertyAccessor = new BasicPropertyAccessor(); private static readonly IPropertyAccessor fieldAccessor = new FieldAccessor(); private static readonly IPropertyAccessor fieldUnderscoreAccessor = new FieldUnderscorePrefixAccessor(); private static readonly IPropertyAccessor fieldMUnderscoreAccessor = new FieldMUnderscorePrefixAccessor(); private PropertyAccessorFactory() { throw new NotSupportedException("Should not be creating a PropertyAccessorFactory - only use the static methods."); } public static IPropertyAccessor GetPropertyAccessor(string type) { if( type==null || "property".Equals(type) ) return basicPropertyAccessor; switch(type) { case "field" : return fieldAccessor; case "field.underscore" : return fieldUnderscoreAccessor; case "field.munderscore" : return fieldMUnderscoreAccessor; } System.Type accessorClass; try { accessorClass = ReflectHelper.ClassForName(type); } catch(TypeLoadException tle) { throw new MappingException("could not find PropertyAccessor type: " + type, tle); } try { return (IPropertyAccessor) Activator.CreateInstance(accessorClass); } catch(Exception e) { throw new MappingException("could not instantiate PropertyAccessor type: " + type, e ); } } } } --- NEW FILE: FieldSetter.cs --- using System; using System.Reflection; namespace NHibernate.Property { public sealed class FieldSetter : ISetter { private readonly FieldInfo field; private readonly System.Type clazz; private readonly string name; public FieldSetter(FieldInfo field, System.Type clazz, string name) { this.field = field; this.clazz = clazz; this.name = name; } #region ISetter Members public void Set(object target, object value) { try { field.SetValue( target, value ); } catch(Exception e) { throw new PropertyAccessException(e, "could not set a field value by reflection", true, clazz, name); } } public string PropertyName { get { return null; } } public PropertyInfo Property { get { return null; } } #endregion } } --- NEW FILE: ISetter.cs --- using System; using System.Reflection; namespace NHibernate.Property { /// <summary> /// Summary description for ISetter. /// </summary> public interface ISetter { /// <summary> /// Set the property value from the given instance /// </summary> /// <param name="target"></param> /// <param name="value"></param> /// <exception cref="HibernateException"> /// </exception> void Set(object target, object value); /// <summary> /// Optional operation (return null) /// </summary> /// <returns></returns> string PropertyName { get; } /// <summary> /// Optional operation (return null) /// </summary> /// <returns></returns> /// <remarks> /// This is used to tell the Proxy which setter to intercept as the <id> /// property. /// </remarks> PropertyInfo Property { get; } } } --- NEW FILE: FieldAccessor.cs --- using System; using System.Reflection; namespace NHibernate.Property { /// <summary> /// Access fields directly. /// </summary> /// <remarks> /// This accesses fields with the following naming convention: /// Property Name = "Id" /// Field Name = "id" /// </remarks> public class FieldAccessor : IPropertyAccessor { #region IPropertyAccessor Members public IGetter GetGetter(System.Type theClass, string propertyName) { string fieldName = GetFieldName(propertyName); return new FieldGetter( GetField( theClass, fieldName ), theClass, fieldName ); } public ISetter GetSetter(System.Type theClass, string propertyName) { string fieldName = GetFieldName(propertyName); return new FieldSetter( GetField( theClass, fieldName ), theClass, fieldName ); } #endregion private static FieldInfo GetField(System.Type clazz, string fieldName) { if( clazz==null || clazz==typeof(object) ) { throw new PropertyNotFoundException("field not found: " + fieldName); } FieldInfo field = clazz.GetField( fieldName, BindingFlags.Instance|BindingFlags.Public|BindingFlags.NonPublic|BindingFlags.DeclaredOnly ); if(field==null) { field = GetField( clazz.BaseType, fieldName ); } // h2.0.3 has a check to see if the field is public - is there a worry about // that in .net?? return field; } /// <summary> /// Converts the Property's name into a Field using camel style casing. /// </summary> /// <param name="propertyName">The name of the Property.</param> /// <returns>The name of the Field.</returns> /// <remarks> /// This uses the convention that a Property named <c>Id</c> will have a field </c>id</c> /// </remarks> protected virtual string GetFieldName(string propertyName) { return propertyName.Substring(0, 1).ToLower() + propertyName.Substring(1); } } } --- NEW FILE: BasicSetter.cs --- using System; using System.Reflection; namespace NHibernate.Property { /// <summary> /// /// </summary> public sealed class BasicSetter : ISetter { private System.Type clazz; private PropertyInfo property; private string propertyName; public BasicSetter(System.Type clazz, PropertyInfo property, string propertyName) { this.clazz = clazz; this.property = property; this.propertyName = propertyName; } #region ISetter Members public void Set(object target, object value) { try { property.SetValue(target, value, new object[0]); } catch (Exception e) { throw new PropertyAccessException(e, "Exception occurred", true, clazz, propertyName); } } public string PropertyName { get { return property.Name; } } public PropertyInfo Property { get { return property; } } #endregion } } |
From: Michael D. <mik...@us...> - 2004-08-22 06:15:48
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/PropertyTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29417/PropertyTest Log Message: Directory /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/PropertyTest added to the repository |
From: Michael D. <mik...@us...> - 2004-08-22 06:13:29
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Property In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28866/Property Log Message: Directory /cvsroot/nhibernate/nhibernate/src/NHibernate/Property added to the repository |
From: Michael D. <mik...@us...> - 2004-08-21 16:40:54
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23046/NHibernate.DomainModel Modified Files: Fo.hbm.xml FooBar.hbm.xml Log Message: modified mapping of serializable type from System.Object to Serializable added some h2.0.3 types to the mapping files instead of nh types. Index: FooBar.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/FooBar.hbm.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** FooBar.hbm.xml 28 Jul 2004 15:09:03 -0000 1.12 --- FooBar.hbm.xml 21 Aug 2004 16:40:42 -0000 1.13 *************** *** 36,64 **** <column name="foo" length="36" index="fbmtoidx"/> </many-to-one> ! <property name="Long"> <column name="long_" index="fbmtoidx" unique-key="abc" not-null="true"/> </property> ! <property name="Integer"> <column name="`@@##integer_ *`" unique-key="abc" not-null="true"/> </property> ! <property name="Float"> <column name="float_" unique-key="abc" not-null="true"/> </property> <property name="X"/> ! <property name="Double" column="double_"/> <primitive-array name="Bytes" table="foobytes"> <key column="id"/> <index column="i"/> ! <element column="byte_" type="Byte"/> </primitive-array> ! <property name="Date" type="DateTime" column="date_"/> <property name="Timestamp" type="Timestamp" column="timestamp_"/> ! <property name="Boolean" column="boolean_"/> <property name="Bool" column="bool_"/> <property name="NullInt32" column="null_"/> ! <property name="Short" column="short_"/> ! <property name="Char" column="char_"/> <property name="Zero" column="zero_"/> <property name="Int" column="int_"/> --- 36,65 ---- <column name="foo" length="36" index="fbmtoidx"/> </many-to-one> ! <property name="Long" type="long"> <column name="long_" index="fbmtoidx" unique-key="abc" not-null="true"/> </property> ! <property name="Integer" type="integer"> <column name="`@@##integer_ *`" unique-key="abc" not-null="true"/> </property> ! <property name="Float" type="float"> <column name="float_" unique-key="abc" not-null="true"/> </property> <property name="X"/> ! <property name="Double" column="double_" type="double"/> <primitive-array name="Bytes" table="foobytes"> <key column="id"/> <index column="i"/> ! <element column="byte_" type="byte"/> </primitive-array> ! <!-- note: this is a Hibernate "date" which is the same as a NHibernate "DateTime" --> ! <property name="Date" column="date_" type="date"/> <property name="Timestamp" type="Timestamp" column="timestamp_"/> ! <property name="Boolean" column="boolean_" type="boolean"/> <property name="Bool" column="bool_"/> <property name="NullInt32" column="null_"/> ! <property name="Short" column="short_" type="short"/> ! <property name="Char" column="char_" type="character"/> <property name="Zero" column="zero_"/> <property name="Int" column="int_"/> *************** *** 67,76 **** </property> <property name="Byte" column="byte_"/> ! <property name="YesNo" /> <property name="Blob" type="NHibernate.DomainModel.Foo+Struct, NHibernate.DomainModel" column="blobb_"/> ! <property name="NullBlob" type="System.Object"/> <property name="Status" column="`status_@###`" type="NHibernate.DomainModel.FooStatus, NHibernate.DomainModel"/> <property name="Binary" column="bin_"/> ! <property name="Locale" column="`localeayzabc123!@#$`"/> <property name="Formula" formula="1/2 * int_"/> --- 68,77 ---- </property> <property name="Byte" column="byte_"/> ! <property name="YesNo" type="yes_no"/> <property name="Blob" type="NHibernate.DomainModel.Foo+Struct, NHibernate.DomainModel" column="blobb_"/> ! <property name="NullBlob" type="Serializable"/> <property name="Status" column="`status_@###`" type="NHibernate.DomainModel.FooStatus, NHibernate.DomainModel"/> <property name="Binary" column="bin_"/> ! <property name="Locale" column="`localeayzabc123!@#$`" type="locale"/> <property name="Formula" formula="1/2 * int_"/> Index: Fo.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Fo.hbm.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Fo.hbm.xml 3 Aug 2004 04:20:08 -0000 1.6 --- Fo.hbm.xml 21 Aug 2004 16:40:42 -0000 1.7 *************** *** 36,40 **** name="Serial" column="serial_" ! type="System.Object" length="4000" /> --- 36,40 ---- name="Serial" column="serial_" ! type="Serializable" length="4000" /> |
From: Michael D. <mik...@us...> - 2004-08-21 16:39:44
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22524/NHibernate.DomainModel Modified Files: DoubleStringType.cs Log Message: modified to use NHibernate.[typename] instead of the TypeFactory Index: DoubleStringType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/DoubleStringType.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DoubleStringType.cs 3 Jun 2004 03:23:33 -0000 1.2 --- DoubleStringType.cs 21 Aug 2004 16:39:00 -0000 1.3 *************** *** 43,48 **** { ! String first = (String) Type.TypeFactory.Basic("String").NullSafeGet(rs, names[0], session, owner); ! String second = (String) Type.TypeFactory.Basic("String").NullSafeGet(rs, names[1], session, owner); return ( first==null && second==null ) ? null : new String[] { first, second }; --- 43,48 ---- { ! String first = (String) NHibernate.String.NullSafeGet(rs, names[0], session, owner); ! String second = (String) NHibernate.String.NullSafeGet(rs, names[1], session, owner); return ( first==null && second==null ) ? null : new String[] { first, second }; *************** *** 54,59 **** String[] strings = (value==null) ? new String[2] : (String[]) value; ! Type.TypeFactory.Basic("String").NullSafeSet(st, strings[0], index, session); ! Type.TypeFactory.Basic("String").NullSafeSet(st, strings[1], index+1, session); } --- 54,59 ---- String[] strings = (value==null) ? new String[2] : (String[]) value; ! NHibernate.String.NullSafeSet(st, strings[0], index, session); ! NHibernate.String.NullSafeSet(st, strings[1], index+1, session); } *************** *** 70,74 **** get { ! return new Type.IType[] { Type.TypeFactory.Basic("String"), Type.TypeFactory.Basic("String") }; } } --- 70,74 ---- get { ! return new Type.IType[] { NHibernate.String, NHibernate.String }; } } |
From: Michael D. <mik...@us...> - 2004-08-21 16:39:30
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/ExpressionTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22524/NHibernate.Test/ExpressionTest Modified Files: JunctionFixture.cs Log Message: modified to use NHibernate.[typename] instead of the TypeFactory Index: JunctionFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/ExpressionTest/JunctionFixture.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** JunctionFixture.cs 28 Jun 2004 18:59:06 -0000 1.2 --- JunctionFixture.cs 21 Aug 2004 16:39:01 -0000 1.3 *************** *** 51,56 **** TypedValue[] expectedTV = new TypedValue[2]; ! expectedTV[0] = new TypedValue(Type.TypeFactory.GetInt32Type(), 5); ! expectedTV[1] = new TypedValue(Type.TypeFactory.GetInt32Type(), 10); Assert.AreEqual(2, typedValues.Length); --- 51,56 ---- TypedValue[] expectedTV = new TypedValue[2]; ! expectedTV[0] = new TypedValue(NHibernate.Int32, 5); ! expectedTV[1] = new TypedValue(NHibernate.Int32, 10); Assert.AreEqual(2, typedValues.Length); |
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Type In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22069/NHibernate/Type Modified Files: AnsiStringType.cs BinaryType.cs BooleanType.cs ByteType.cs CharType.cs CultureInfoType.cs DateTimeType.cs DateType.cs DecimalType.cs DoubleType.cs GuidType.cs Int16Type.cs Int32Type.cs Int64Type.cs ObjectType.cs SerializableType.cs SingleType.cs StringType.cs TicksType.cs TimeSpanType.cs TimestampType.cs TimeType.cs TrueFalseType.cs TypeFactory.cs TypeType.cs YesNoType.cs Log Message: modified Types so that the mapping type="" would be h2.0.3 compatible to allow people to use h2.0.3 existing tools for code generation. Index: TimeType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/TimeType.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TimeType.cs 18 May 2004 05:04:12 -0000 1.4 --- TimeType.cs 21 Aug 2004 16:37:33 -0000 1.5 *************** *** 16,22 **** public class TimeType : MutableType, IIdentifierType, ILiteralType, IVersionType { ! ! ! public TimeType (TimeSqlType sqlType) : base(sqlType) { } --- 16,20 ---- public class TimeType : MutableType, IIdentifierType, ILiteralType, IVersionType { ! internal TimeType() : base( new TimeSqlType() ) { } Index: TypeType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/TypeType.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TypeType.cs 13 Aug 2004 13:25:23 -0000 1.2 --- TypeType.cs 21 Aug 2004 16:37:33 -0000 1.3 *************** *** 11,15 **** /// variable length string column. /// </summary> ! public class TypeType : ImmutableType { /// <summary> --- 11,20 ---- /// variable length string column. /// </summary> ! public class TypeType : ImmutableType ! { ! ! internal TypeType() : base( new StringSqlType() ) ! { ! } /// <summary> *************** *** 34,45 **** { string str = (string) NHibernate.String.Get(rs, index); ! if (str == null) { return null; } ! else { ! try { return ReflectHelper.ClassForName(str); } ! catch (TypeLoadException) { throw new HibernateException("Class not found: " + str); } --- 39,54 ---- { string str = (string) NHibernate.String.Get(rs, index); ! if (str == null) ! { return null; } ! else ! { ! try ! { return ReflectHelper.ClassForName(str); } ! catch (TypeLoadException) ! { throw new HibernateException("Class not found: " + str); } *************** *** 102,110 **** /// A <see cref="System.Type"/> from the .NET framework. /// </value> ! public override System.Type ReturnedClass { get { return typeof(System.Type); } } ! public override bool Equals(object x, object y) { if(x==null && y==null) --- 111,121 ---- /// A <see cref="System.Type"/> from the .NET framework. /// </value> ! public override System.Type ReturnedClass ! { get { return typeof(System.Type); } } ! public override bool Equals(object x, object y) ! { if(x==null && y==null) *************** *** 121,125 **** } ! public override string Name { get { return "Type"; } } --- 132,137 ---- } ! public override string Name ! { get { return "Type"; } } Index: ByteType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/ByteType.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ByteType.cs 18 May 2004 05:04:12 -0000 1.5 --- ByteType.cs 21 Aug 2004 16:37:32 -0000 1.6 *************** *** 12,16 **** public class ByteType : PrimitiveType, IDiscriminatorType { ! internal ByteType(ByteSqlType sqlType) : base(sqlType) { } --- 12,17 ---- public class ByteType : PrimitiveType, IDiscriminatorType { ! internal ByteType() : base( new ByteSqlType() ) ! { } Index: DateType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/DateType.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** DateType.cs 18 May 2004 05:04:12 -0000 1.8 --- DateType.cs 21 Aug 2004 16:37:32 -0000 1.9 *************** *** 7,14 **** public class DateType : MutableType, IIdentifierType, ILiteralType, IVersionType { ! ! public DateType (DateSqlType sqlType) : base(sqlType) ! { ! } public override object Get(IDataReader rs, int index) --- 7,13 ---- public class DateType : MutableType, IIdentifierType, ILiteralType, IVersionType { ! internal DateType() : base( new DateSqlType() ) ! { ! } public override object Get(IDataReader rs, int index) Index: YesNoType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/YesNoType.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** YesNoType.cs 18 Jul 2004 03:06:13 -0000 1.4 --- YesNoType.cs 21 Aug 2004 16:37:33 -0000 1.5 *************** *** 20,24 **** { ! internal YesNoType(AnsiStringFixedLengthSqlType sqlType) : base(sqlType) { } --- 20,24 ---- { ! internal YesNoType() : base( new AnsiStringFixedLengthSqlType(1) ) { } Index: Int16Type.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/Int16Type.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Int16Type.cs 18 May 2004 05:04:12 -0000 1.2 --- Int16Type.cs 21 Aug 2004 16:37:33 -0000 1.3 *************** *** 8,12 **** public class Int16Type : PrimitiveType, IDiscriminatorType, IVersionType { ! internal Int16Type(Int16SqlType sqlType) : base(sqlType) { } --- 8,13 ---- public class Int16Type : PrimitiveType, IDiscriminatorType, IVersionType { ! internal Int16Type() : base( new Int16SqlType() ) ! { } Index: CultureInfoType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/CultureInfoType.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CultureInfoType.cs 10 Feb 2004 18:41:42 -0000 1.2 --- CultureInfoType.cs 21 Aug 2004 16:37:32 -0000 1.3 *************** *** 13,17 **** public class CultureInfoType : ImmutableType, ILiteralType { ! internal CultureInfoType(StringSqlType sqlType) : base(sqlType) { } --- 13,18 ---- public class CultureInfoType : ImmutableType, ILiteralType { ! internal CultureInfoType() : base( new StringSqlType(5) ) ! { } Index: DecimalType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/DecimalType.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DecimalType.cs 31 Jul 2004 14:50:32 -0000 1.4 --- DecimalType.cs 21 Aug 2004 16:37:32 -0000 1.5 *************** *** 12,16 **** public class DecimalType : PrimitiveType, IIdentifierType { ! internal DecimalType(DecimalSqlType sqlType) : base(sqlType) { --- 12,19 ---- public class DecimalType : PrimitiveType, IIdentifierType { ! internal DecimalType() : this( new DecimalSqlType() ) ! { ! } ! internal DecimalType(DecimalSqlType sqlType) : base(sqlType) { Index: GuidType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/GuidType.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GuidType.cs 18 May 2004 05:04:12 -0000 1.2 --- GuidType.cs 21 Aug 2004 16:37:32 -0000 1.3 *************** *** 10,14 **** { ! internal GuidType(GuidSqlType sqlType) : base(sqlType) { } --- 10,14 ---- { ! internal GuidType() : base( new GuidSqlType() ) { } Index: SingleType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/SingleType.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SingleType.cs 18 May 2004 05:04:12 -0000 1.3 --- SingleType.cs 21 Aug 2004 16:37:33 -0000 1.4 *************** *** 16,21 **** public class SingleType : PrimitiveType { ! ! internal SingleType(SingleSqlType sqlType) : base(sqlType) { } --- 16,20 ---- public class SingleType : PrimitiveType { ! internal SingleType() : base( new SingleSqlType() ) { } Index: BooleanType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/BooleanType.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** BooleanType.cs 20 Aug 2004 17:39:01 -0000 1.7 --- BooleanType.cs 21 Aug 2004 16:37:32 -0000 1.8 *************** *** 21,30 **** /// <summary> ! /// Initialize a new instance of the BooleanType class using a ! /// <see cref="BooleanSqlType"/>. /// </summary> - /// <param name="sqlType">The underlying <see cref="SqlType"/>.</param> /// <remarks>This is used when the Property is mapped to a native boolean type.</remarks> ! internal BooleanType(BooleanSqlType sqlType) : base(sqlType) { } --- 21,29 ---- /// <summary> ! /// Initialize a new instance of the BooleanType /// </summary> /// <remarks>This is used when the Property is mapped to a native boolean type.</remarks> ! internal BooleanType() : base( new BooleanSqlType() ) ! { } Index: Int64Type.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/Int64Type.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Int64Type.cs 18 May 2004 05:04:12 -0000 1.2 --- Int64Type.cs 21 Aug 2004 16:37:33 -0000 1.3 *************** *** 8,12 **** public class Int64Type : PrimitiveType, IIdentifierType, IVersionType { ! internal Int64Type(Int64SqlType sqlType) : base(sqlType) { } --- 8,13 ---- public class Int64Type : PrimitiveType, IIdentifierType, IVersionType { ! internal Int64Type() : base( new Int64SqlType() ) ! { } Index: TypeFactory.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/TypeFactory.cs,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** TypeFactory.cs 3 Aug 2004 04:18:44 -0000 1.36 --- TypeFactory.cs 21 Aug 2004 16:37:33 -0000 1.37 *************** *** 4,7 **** --- 4,8 ---- using System.Globalization; + using NHibernate; using NHibernate.Collection; using NHibernate.Engine; *************** *** 43,56 **** * * key -> value * "DateTime" -> instance of DateTimeType ! * "NHibernate.Type.DateTimeType" -> instance of DateTimeType * "Decimal" -> instance of DecimalType with default p,s - * "NHibernate.Type.DecimalType" -> instance of DecimalType with default p,s * "Decimal(p, s)" -> instance of DecimalType with specified p,s - * "NHibernate.Type.DecimalType(p, s)" -> instance of DecimalType with specified p,s * "String" -> instance of StringType with default l * "NHibernate.Type.StringType" -> instance of StringType with default l * "String(l)" -> instance of StringType with specified l ! * "NHibernate.Type.StringType(l)" -> instance of StringType with specified l */ private static Hashtable typeByTypeOfName = Hashtable.Synchronized(new Hashtable(79)); --- 44,58 ---- * * key -> value + * "System.DateTime" -> instance of DateTimeType + * "System.DateTime, fully assembly name" -> instance of DateTimeType * "DateTime" -> instance of DateTimeType ! * "System.Decimal" -> instance of DecimaType with default p,s * "Decimal" -> instance of DecimalType with default p,s * "Decimal(p, s)" -> instance of DecimalType with specified p,s * "String" -> instance of StringType with default l + * "System.String" -> instance of StringType with default l * "NHibernate.Type.StringType" -> instance of StringType with default l * "String(l)" -> instance of StringType with specified l ! * "System.String(l)" -> instance of StringType with specified l */ private static Hashtable typeByTypeOfName = Hashtable.Synchronized(new Hashtable(79)); *************** *** 66,71 **** static TypeFactory() { - - //basicTypes.Add(NHibernate.Blob.Name, NHibernate.Blob); //basicTypes.Add(NHibernate.Clob.Name, NHibernate.Clob); --- 68,71 ---- *************** *** 77,114 **** // get a Timezone by name... //basicTypes.Add(NHibernate.Timezone.Name, NHibernate.Timezone); ! TypeFactory.GetAnsiStringType(); ! TypeFactory.GetBinaryType(); ! TypeFactory.GetBooleanType(); ! TypeFactory.GetByteType(); ! TypeFactory.GetCharType(); ! TypeFactory.GetCultureInfoType(); ! TypeFactory.GetDateTimeType(); ! TypeFactory.GetDateType(); ! TypeFactory.GetDecimalType(); ! TypeFactory.GetDoubleType(); ! TypeFactory.GetGuidType(); ! TypeFactory.GetInt16Type(); ! TypeFactory.GetInt32Type(); ! TypeFactory.GetInt64Type(); ! TypeFactory.GetObjectType(); ! TypeFactory.GetSerializableType(); ! TypeFactory.GetSingleType(); ! TypeFactory.GetStringType(); ! TypeFactory.GetTimestampType(); ! TypeFactory.GetTimeType(); ! TypeFactory.GetTrueFalseType(); ! TypeFactory.GetTypeType(); ! TypeFactory.GetYesNoType(); ! TypeFactory.GetTicksType(); ! TypeFactory.GetTimeSpanType(); ! getTypeDelegatesWithLength.Add(TypeFactory.GetAnsiStringType().Name, new GetNullableTypeWithLength(GetAnsiStringType)); ! getTypeDelegatesWithLength.Add(TypeFactory.GetBinaryType().Name, new GetNullableTypeWithLength(GetBinaryType)); ! getTypeDelegatesWithLength.Add(TypeFactory.GetSerializableType().Name, new GetNullableTypeWithLength(GetSerializableType)); ! getTypeDelegatesWithLength.Add(TypeFactory.GetStringType().Name, new GetNullableTypeWithLength(GetStringType)); ! getTypeDelegatesWithLength.Add(TypeFactory.GetTypeType().Name, new GetNullableTypeWithLength(GetTypeType)); ! getTypeDelegatesWithPrecision.Add(TypeFactory.GetDecimalType().Name, new GetNullableTypeWithPrecision(GetDecimalType)); } --- 77,179 ---- // get a Timezone by name... //basicTypes.Add(NHibernate.Timezone.Name, NHibernate.Timezone); + typeByTypeOfName[ typeof(System.Byte[]).Name ] = NHibernate.Binary ; + typeByTypeOfName[ typeof(System.Byte[]).AssemblyQualifiedName ] = NHibernate.Binary ; + typeByTypeOfName[ typeof(System.Boolean).FullName ] = NHibernate.Boolean; + typeByTypeOfName[ typeof(System.Boolean).AssemblyQualifiedName ] = NHibernate.Boolean; + typeByTypeOfName[ typeof(System.Byte).FullName ] = NHibernate.Byte; + typeByTypeOfName[ typeof(System.Byte).AssemblyQualifiedName ] = NHibernate.Byte; + typeByTypeOfName[ typeof(System.Char).FullName ] = NHibernate.Character; + typeByTypeOfName[ typeof(System.Char).AssemblyQualifiedName ] = NHibernate.Character; + typeByTypeOfName[ typeof(System.Globalization.CultureInfo).FullName ] = NHibernate.CultureInfo; + typeByTypeOfName[ typeof(System.Globalization.CultureInfo).AssemblyQualifiedName ] = NHibernate.CultureInfo; + typeByTypeOfName[ typeof(System.DateTime).FullName ] = NHibernate.DateTime; + typeByTypeOfName[ typeof(System.DateTime).AssemblyQualifiedName ] = NHibernate.DateTime; + typeByTypeOfName[ typeof(System.Decimal).FullName ] = NHibernate.Decimal; + typeByTypeOfName[ typeof(System.Decimal).AssemblyQualifiedName ] = NHibernate.Decimal; + typeByTypeOfName[ typeof(System.Double).FullName ] = NHibernate.Double; + typeByTypeOfName[ typeof(System.Double).AssemblyQualifiedName ] = NHibernate.Double; + typeByTypeOfName[ typeof(System.Guid).FullName ] = NHibernate.Guid; + typeByTypeOfName[ typeof(System.Guid).AssemblyQualifiedName ] = NHibernate.Guid; + typeByTypeOfName[ typeof(System.Int16).FullName ] = NHibernate.Int16; + typeByTypeOfName[ typeof(System.Int16).AssemblyQualifiedName ] = NHibernate.Int16; + typeByTypeOfName[ typeof(System.Int32).FullName ] = NHibernate.Int32; + typeByTypeOfName[ typeof(System.Int32).AssemblyQualifiedName ] = NHibernate.Int32; + typeByTypeOfName[ typeof(System.Int64).FullName ] = NHibernate.Int64; + typeByTypeOfName[ typeof(System.Int64).AssemblyQualifiedName ] = NHibernate.Int64; + typeByTypeOfName[ typeof(System.Single).FullName ] = NHibernate.Single; + typeByTypeOfName[ typeof(System.Single).AssemblyQualifiedName ] = NHibernate.Single; + typeByTypeOfName[ typeof(System.String).FullName ] = NHibernate.String; + typeByTypeOfName[ typeof(System.String).AssemblyQualifiedName ] = NHibernate.String; + typeByTypeOfName[ typeof(System.TimeSpan).FullName ] = NHibernate.TimeSpan; + typeByTypeOfName[ typeof(System.TimeSpan).AssemblyQualifiedName ] = NHibernate.TimeSpan; ! typeByTypeOfName[ NHibernate.AnsiString.Name ] = NHibernate.AnsiString ; ! typeByTypeOfName[ NHibernate.Binary.Name ] = NHibernate.Binary ; ! typeByTypeOfName[ NHibernate.Boolean.Name ] = NHibernate.Boolean; ! typeByTypeOfName[ NHibernate.Byte.Name ] = NHibernate.Byte; ! typeByTypeOfName[ NHibernate.Character.Name ] = NHibernate.Character; ! typeByTypeOfName[ NHibernate.CultureInfo.Name ] = NHibernate.CultureInfo; ! typeByTypeOfName[ NHibernate.DateTime.Name ] = NHibernate.DateTime; ! typeByTypeOfName[ NHibernate.Date.Name ] = NHibernate.Date; ! typeByTypeOfName[ NHibernate.Decimal.Name ] = NHibernate.Decimal; ! typeByTypeOfName[ NHibernate.Double.Name ] = NHibernate.Double; ! typeByTypeOfName[ NHibernate.Guid.Name ] = NHibernate.Guid; ! typeByTypeOfName[ NHibernate.Int16.Name ] = NHibernate.Int16; ! typeByTypeOfName[ NHibernate.Int32.Name ] = NHibernate.Int32; ! typeByTypeOfName[ NHibernate.Int64.Name ] = NHibernate.Int64; ! typeByTypeOfName[ NHibernate.String.Name ] = NHibernate.String; ! typeByTypeOfName[ NHibernate.Single.Name ] = NHibernate.Single; ! typeByTypeOfName[ NHibernate.Timestamp.Name ] = NHibernate.Timestamp; ! typeByTypeOfName[ NHibernate.Time.Name ] = NHibernate.Time; ! typeByTypeOfName[ NHibernate.TrueFalse.Name ] = NHibernate.TrueFalse; ! typeByTypeOfName[ NHibernate.YesNo.Name ] = NHibernate.YesNo; ! typeByTypeOfName[ NHibernate.Ticks.Name ] = NHibernate.Ticks; ! typeByTypeOfName[ NHibernate.TimeSpan.Name ] = NHibernate.TimeSpan; ! ! typeByTypeOfName[ NHibernate.Class.Name ] = NHibernate.Class; ! typeByTypeOfName[ typeof(System.Type).FullName ] = NHibernate.Class; ! typeByTypeOfName[ typeof(System.Type).AssemblyQualifiedName ] = NHibernate.Class; ! // need to do add the key "Serializable" because the hbm files will have a ! // type="Serializable", but the SerializableType returns the Name as ! // "serializable - System.Object for the default SerializableType. ! typeByTypeOfName[ "Serializable" ] = NHibernate.Serializable; ! typeByTypeOfName[ NHibernate.Serializable.Name ] = NHibernate.Serializable; ! ! typeByTypeOfName[ typeof(System.Object).FullName ] = NHibernate.Object; ! typeByTypeOfName[ typeof(System.Object).AssemblyQualifiedName ] = NHibernate.Object; ! typeByTypeOfName[ NHibernate.Object.Name ] = NHibernate.Object; ! ! // These are in here for Hibernate mapping compatibility ! typeByTypeOfName[ "binary" ] = NHibernate.Binary ; ! // TODO: add clob and blob when implemented ! typeByTypeOfName[ "boolean" ] = NHibernate.Boolean; ! typeByTypeOfName[ "byte" ] = NHibernate.Byte; ! typeByTypeOfName[ "character" ] = NHibernate.Character; ! typeByTypeOfName[ "class" ] = NHibernate.Class; ! typeByTypeOfName[ "locale" ] = NHibernate.CultureInfo; ! typeByTypeOfName[ "date" ] = NHibernate.DateTime; ! typeByTypeOfName[ "big_decimal" ] = NHibernate.Decimal; ! typeByTypeOfName[ "double" ] = NHibernate.Double; ! typeByTypeOfName[ "short" ] = NHibernate.Int16; ! typeByTypeOfName[ "integer" ] = NHibernate.Int32; ! typeByTypeOfName[ "long" ] = NHibernate.Int64; ! typeByTypeOfName[ "float" ] = NHibernate.Single; ! typeByTypeOfName[ "serializable" ] = NHibernate.Serializable; ! typeByTypeOfName[ "string" ] = NHibernate.String; ! typeByTypeOfName[ "timestamp" ] = NHibernate.Timestamp; ! typeByTypeOfName[ "time" ] = NHibernate.Time; ! typeByTypeOfName[ "true_false" ] = NHibernate.TrueFalse; ! typeByTypeOfName[ "yes_no" ] = NHibernate.YesNo; ! typeByTypeOfName[ "object" ] = NHibernate.Object; ! ! getTypeDelegatesWithLength.Add(NHibernate.AnsiString.Name, new GetNullableTypeWithLength(GetAnsiStringType)); ! getTypeDelegatesWithLength.Add(NHibernate.Binary.Name, new GetNullableTypeWithLength(GetBinaryType)); ! getTypeDelegatesWithLength.Add(NHibernate.Serializable.Name, new GetNullableTypeWithLength(GetSerializableType)); ! getTypeDelegatesWithLength.Add(NHibernate.String.Name, new GetNullableTypeWithLength(GetStringType)); ! getTypeDelegatesWithLength.Add(NHibernate.Class.Name, new GetNullableTypeWithLength(GetTypeType)); ! ! getTypeDelegatesWithPrecision.Add(NHibernate.Decimal.Name, new GetNullableTypeWithPrecision(GetDecimalType)); } *************** *** 248,252 **** { typeByTypeOfName.Add(key, type); - typeByTypeOfName.Add(GetKeyForLengthBased(type), type); return type; } --- 313,316 ---- *************** *** 255,259 **** { typeByTypeOfName.Add(key, type); - typeByTypeOfName.Add(GetKeyForPrecisionScaleBased(type), type); return type; } --- 319,322 ---- *************** *** 377,395 **** public static NullableType GetAnsiStringType() { ! string key = typeof(AnsiStringType).FullName; ! ! NullableType returnType = (NullableType)typeByTypeOfName[key]; ! if(returnType==null) ! { ! returnType = new AnsiStringType( new AnsiStringSqlType() ); ! AddToTypeOfName(key, returnType); ! } ! ! return returnType; } public static NullableType GetAnsiStringType(int length) { ! string key = GetKeyForLengthBased(typeof(AnsiStringType).FullName, length); NullableType returnType = (NullableType)typeByTypeOfName[key]; --- 440,449 ---- public static NullableType GetAnsiStringType() { ! return NHibernate.AnsiString; } public static NullableType GetAnsiStringType(int length) { ! string key = GetKeyForLengthBased(NHibernate.AnsiString.Name, length); NullableType returnType = (NullableType)typeByTypeOfName[key]; *************** *** 420,433 **** public static NullableType GetBinaryType() { ! string key = typeof(BinaryType).FullName; ! NullableType returnType = (NullableType)typeByTypeOfName[key]; ! if(returnType==null) ! { ! returnType = new BinaryType(new BinarySqlType()); ! AddToTypeOfName(key, returnType); ! } ! ! return returnType; ! } --- 474,478 ---- public static NullableType GetBinaryType() { ! return NHibernate.Binary; } *************** *** 444,448 **** public static NullableType GetBinaryType(int length) { ! string key = GetKeyForLengthBased(typeof(BinaryType).FullName, length); NullableType returnType = (NullableType)typeByTypeOfName[key]; if(returnType==null) --- 489,496 ---- public static NullableType GetBinaryType(int length) { ! //HACK: don't understand why SerializableType calls this with length=0 ! if(length==0) return NHibernate.Binary; ! ! string key = GetKeyForLengthBased(NHibernate.Binary.Name, length); NullableType returnType = (NullableType)typeByTypeOfName[key]; if(returnType==null) *************** *** 462,475 **** public static NullableType GetBooleanType() { ! string key = typeof(BooleanType).FullName; ! NullableType returnType = (NullableType)typeByTypeOfName[key]; ! if(returnType==null) ! { ! returnType = new BooleanType( SqlTypeFactory.GetBoolean() ); ! AddToTypeOfName(key, returnType); ! } ! ! return returnType; ! } --- 510,514 ---- public static NullableType GetBooleanType() { ! return NHibernate.Boolean; } *************** *** 480,493 **** public static NullableType GetByteType() { ! string key = typeof(ByteType).FullName; ! NullableType returnType = (NullableType)typeByTypeOfName[key]; ! if(returnType==null) ! { ! returnType = new ByteType( SqlTypeFactory.GetByte() ); ! AddToTypeOfName(key, returnType); ! } ! ! return returnType; ! } --- 519,523 ---- public static NullableType GetByteType() { ! return NHibernate.Byte; } *************** *** 498,510 **** public static NullableType GetCharType() { ! string key = GetKeyForLengthBased(typeof(CharType).FullName, 1); ! NullableType returnType = (NullableType)typeByTypeOfName[key]; ! if(returnType==null) ! { ! returnType = new CharType( SqlTypeFactory.GetStringFixedLength(1) ); ! AddToTypeOfName(key, returnType); ! } ! ! return returnType; } --- 528,532 ---- public static NullableType GetCharType() { ! return NHibernate.Character; } *************** *** 515,528 **** public static NullableType GetCultureInfoType() { ! string key = typeof(CultureInfoType).FullName; ! NullableType returnType = (NullableType)typeByTypeOfName[key]; ! if(returnType==null) ! { ! returnType = new CultureInfoType( SqlTypeFactory.GetString(5) ); ! AddToTypeOfName(key, returnType); ! } ! ! return returnType; ! } --- 537,541 ---- public static NullableType GetCultureInfoType() { ! return NHibernate.CultureInfo; } *************** *** 533,545 **** public static NullableType GetDateTimeType() { ! string key = typeof(DateTimeType).FullName; ! NullableType returnType = (NullableType)typeByTypeOfName[key]; ! if(returnType==null) ! { ! returnType = new DateTimeType(SqlTypeFactory.GetDateTime()); ! AddToTypeOfName(key, returnType); ! } ! ! return returnType; } --- 546,550 ---- public static NullableType GetDateTimeType() { ! return NHibernate.DateTime; } *************** *** 550,562 **** public static NullableType GetDateType() { ! string key = typeof(DateType).FullName; ! NullableType returnType = (NullableType)typeByTypeOfName[key]; ! if(returnType==null) ! { ! returnType = new DateType( SqlTypeFactory.GetDate() ); ! AddToTypeOfName(key, returnType); ! } ! ! return returnType; } --- 555,559 ---- public static NullableType GetDateType() { ! return NHibernate.Date; } *************** *** 568,581 **** public static NullableType GetDecimalType() { ! string key = typeof(DecimalType).FullName; ! NullableType returnType = (NullableType)typeByTypeOfName[key]; ! if(returnType==null) ! { ! returnType = new DecimalType(new DecimalSqlType()); ! AddToTypeOfName(key, returnType); ! } ! ! return returnType; ! } --- 565,569 ---- public static NullableType GetDecimalType() { ! return NHibernate.Decimal; } *************** *** 588,592 **** public static NullableType GetDecimalType(byte precision, byte scale) { ! string key = GetKeyForPrecisionScaleBased(typeof(DecimalType).FullName, precision, scale); NullableType returnType = (NullableType)typeByTypeOfName[key]; if(returnType==null) --- 576,580 ---- public static NullableType GetDecimalType(byte precision, byte scale) { ! string key = GetKeyForPrecisionScaleBased(NHibernate.Decimal.Name, precision, scale); NullableType returnType = (NullableType)typeByTypeOfName[key]; if(returnType==null) *************** *** 606,620 **** public static NullableType GetDoubleType() { ! string key = typeof(DoubleType).FullName; ! NullableType returnType = (NullableType)typeByTypeOfName[key]; ! if(returnType==null) ! { ! returnType = new DoubleType( SqlTypeFactory.GetDouble() ); ! AddToTypeOfName(key, returnType); ! } ! ! return returnType; ! ! } --- 594,598 ---- public static NullableType GetDoubleType() { ! return NHibernate.Double; } *************** *** 625,639 **** public static NullableType GetGuidType() { ! ! string key = typeof(GuidType).FullName; ! NullableType returnType = (NullableType)typeByTypeOfName[key]; ! if(returnType==null) ! { ! returnType = new GuidType( SqlTypeFactory.GetGuid() ); ! AddToTypeOfName(key, returnType); ! } ! ! return returnType; ! } --- 603,607 ---- public static NullableType GetGuidType() { ! return NHibernate.Guid; } *************** *** 644,657 **** public static NullableType GetInt16Type() { ! string key = typeof(Int16Type).FullName; ! NullableType returnType = (NullableType)typeByTypeOfName[key]; ! if(returnType==null) ! { ! returnType = new Int16Type( SqlTypeFactory.GetInt16() ); ! AddToTypeOfName(key, returnType); ! } ! ! return returnType; ! } --- 612,616 ---- public static NullableType GetInt16Type() { ! return NHibernate.Int16; } *************** *** 662,676 **** public static NullableType GetInt32Type() { ! ! string key = typeof(Int32Type).FullName; ! NullableType returnType = (NullableType)typeByTypeOfName[key]; ! if(returnType==null) ! { ! returnType = new Int32Type( SqlTypeFactory.GetInt32() ); ! AddToTypeOfName(key, returnType); ! } ! ! return returnType; ! } --- 621,625 ---- public static NullableType GetInt32Type() { ! return NHibernate.Int32; } *************** *** 681,693 **** public static NullableType GetInt64Type() { ! string key = typeof(Int64Type).FullName; ! ! NullableType returnType = (NullableType)typeByTypeOfName[key]; ! if(returnType==null) { ! returnType = new Int64Type( SqlTypeFactory.GetInt64() ); ! AddToTypeOfName(key, returnType); ! } ! ! return returnType; } --- 630,634 ---- public static NullableType GetInt64Type() { ! return NHibernate.Int64; } *************** *** 698,711 **** public static IType GetObjectType() { ! string key = typeof(ObjectType).FullName; ! ! IType returnType = (IType)typeByTypeOfName[key]; ! if(returnType==null) ! { ! returnType = new ObjectType( ); ! AddToTypeOfName(key, returnType); ! } ! ! return returnType; } --- 639,643 ---- public static IType GetObjectType() { ! return NHibernate.Object; } *************** *** 716,729 **** public static NullableType GetSingleType() { ! string key = typeof(SingleType).FullName; ! NullableType returnType = (NullableType)typeByTypeOfName[key]; ! if(returnType==null) ! { ! returnType = new SingleType( SqlTypeFactory.GetSingle() ); ! AddToTypeOfName(key, returnType); ! } ! ! return returnType; ! } --- 648,652 ---- public static NullableType GetSingleType() { ! return NHibernate.Single; } *************** *** 734,746 **** public static NullableType GetSerializableType() { ! string key = typeof(SerializableType).FullName; ! NullableType returnType = (NullableType)typeByTypeOfName[key]; ! if(returnType==null) ! { ! returnType = new SerializableType( typeof(object) ); ! AddToTypeOfName(key, returnType); ! } ! ! return returnType; } --- 657,661 ---- public static NullableType GetSerializableType() { ! return NHibernate.Serializable; } *************** *** 808,812 **** public static NullableType GetSerializableType(int length) { ! string key = GetKeyForLengthBased(typeof(SerializableType).FullName, length); NullableType returnType = (NullableType)typeByTypeOfName[key]; --- 723,727 ---- public static NullableType GetSerializableType(int length) { ! string key = GetKeyForLengthBased(NHibernate.Serializable.Name, length); NullableType returnType = (NullableType)typeByTypeOfName[key]; *************** *** 827,840 **** public static NullableType GetStringType() { ! string key = typeof(StringType).FullName; ! ! NullableType returnType = (NullableType)typeByTypeOfName[key]; ! if(returnType==null) ! { ! returnType = new StringType( new StringSqlType() ); ! AddToTypeOfName(key, returnType); ! } ! ! return returnType; } --- 742,746 ---- public static NullableType GetStringType() { ! return NHibernate.String; } *************** *** 846,850 **** public static NullableType GetStringType(int length) { ! string key = GetKeyForLengthBased(typeof(StringType).FullName, length); NullableType returnType = (NullableType)typeByTypeOfName[key]; --- 752,756 ---- public static NullableType GetStringType(int length) { ! string key = GetKeyForLengthBased(NHibernate.String.Name, length); NullableType returnType = (NullableType)typeByTypeOfName[key]; *************** *** 865,880 **** public static NullableType GetTicksType() { ! ! string key = typeof(TicksType).FullName; ! ! NullableType returnType = (NullableType)typeByTypeOfName[key]; ! if(returnType==null) ! { ! returnType = new TicksType( SqlTypeFactory.GetInt64() ); ! AddToTypeOfName(key, returnType); ! } ! ! return returnType; ! } --- 771,775 ---- public static NullableType GetTicksType() { ! return NHibernate.Ticks; } *************** *** 885,900 **** public static NullableType GetTimeSpanType() { ! ! string key = typeof(TimeSpanType).FullName; ! ! NullableType returnType = (NullableType)typeByTypeOfName[key]; ! if(returnType==null) ! { ! returnType = new TimeSpanType( SqlTypeFactory.GetInt64() ); ! AddToTypeOfName(key, returnType); ! } ! ! return returnType; ! } --- 780,784 ---- public static NullableType GetTimeSpanType() { ! return NHibernate.TimeSpan; } *************** *** 904,919 **** /// <returns></returns> public static NullableType GetTimestampType() ! { ! string key = typeof(TimestampType).FullName; ! ! NullableType returnType = (NullableType)typeByTypeOfName[key]; ! if(returnType==null) ! { ! returnType = new TimestampType( SqlTypeFactory.GetDateTime() ); ! AddToTypeOfName(key, returnType); ! } ! ! return returnType; ! } --- 788,793 ---- /// <returns></returns> public static NullableType GetTimestampType() ! { ! return NHibernate.Timestamp; } *************** *** 924,938 **** public static NullableType GetTimeType() { ! string key = typeof(TimeType).FullName; ! ! NullableType returnType = (NullableType)typeByTypeOfName[key]; ! if(returnType==null) ! { ! returnType = new TimeType( SqlTypeFactory.GetTime() ); ! AddToTypeOfName(key, returnType); ! } ! ! return returnType; ! } --- 798,802 ---- public static NullableType GetTimeType() { ! return NHibernate.Time; } *************** *** 943,957 **** public static NullableType GetTrueFalseType() { ! string key = typeof(TrueFalseType).FullName; ! ! NullableType returnType = (NullableType)typeByTypeOfName[key]; ! if(returnType==null) ! { ! returnType = new TrueFalseType( SqlTypeFactory.GetAnsiStringFixedLength(1) ); ! AddToTypeOfName(key, returnType); ! } ! ! return returnType; ! } --- 807,811 ---- public static NullableType GetTrueFalseType() { ! return NHibernate.TrueFalse; } *************** *** 962,978 **** public static NullableType GetTypeType() { ! // this will add the default basic name ! // for the TypeType it will add this TypeType as Type and Type(255) ! string key = typeof(TypeType).FullName; ! ! NullableType returnType = (NullableType)typeByTypeOfName[key]; ! if(returnType==null) ! { ! returnType = new TypeType( new StringSqlType() ); ! AddToTypeOfName(key, returnType); ! } ! ! return returnType; ! } --- 816,820 ---- public static NullableType GetTypeType() { ! return NHibernate.Class; } *************** *** 1003,1017 **** public static NullableType GetYesNoType() { ! string key = typeof(YesNoType).FullName; ! ! NullableType returnType = (NullableType)typeByTypeOfName[key]; ! if(returnType==null) ! { ! returnType = new YesNoType( SqlTypeFactory.GetAnsiStringFixedLength(1) ); ! AddToTypeOfName(key, returnType); ! } ! ! return returnType; ! } --- 845,849 ---- public static NullableType GetYesNoType() { ! return NHibernate.YesNo; } Index: CharType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/CharType.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CharType.cs 20 Aug 2004 17:39:01 -0000 1.3 --- CharType.cs 21 Aug 2004 16:37:32 -0000 1.4 *************** *** 11,15 **** public class CharType : PrimitiveType , IDiscriminatorType { ! internal CharType(StringFixedLengthSqlType sqlType) : base(sqlType) { } --- 11,16 ---- public class CharType : PrimitiveType , IDiscriminatorType { ! internal CharType() : base( new StringFixedLengthSqlType(1) ) ! { } Index: BinaryType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/BinaryType.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** BinaryType.cs 20 Aug 2004 17:39:01 -0000 1.5 --- BinaryType.cs 21 Aug 2004 16:37:32 -0000 1.6 *************** *** 12,17 **** /// BinaryType. /// </summary> ! public class BinaryType : MutableType{ ! internal BinaryType(BinarySqlType sqlType) : base(sqlType) { } --- 12,21 ---- /// BinaryType. /// </summary> ! public class BinaryType : MutableType ! { ! internal BinaryType() : this( new BinarySqlType() ) ! { ! } ! internal BinaryType(BinarySqlType sqlType) : base(sqlType) { } Index: SerializableType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/SerializableType.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SerializableType.cs 31 Jul 2004 19:16:44 -0000 1.4 --- SerializableType.cs 21 Aug 2004 16:37:33 -0000 1.5 *************** *** 30,37 **** private BinaryType binaryType; ! public SerializableType(System.Type serializableClass) ! //: this(serializableClass, SqlTypeFactory.GetBinary()) ! : this( serializableClass, new BinarySqlType() ) { } --- 30,41 ---- private BinaryType binaryType; ! internal SerializableType() : this( typeof(Object) ) ! { ! } ! ! internal SerializableType(System.Type serializableClass) : base( new BinarySqlType() ) { + this.serializableClass = serializableClass; + this.binaryType = (BinaryType)NHibernate.Binary; } *************** *** 71,75 **** } public override string Name { ! get { return serializableClass.FullName; } } public override object DeepCopyNotNull(object value) { --- 75,79 ---- } public override string Name { ! get { return "serializable - " + serializableClass.FullName; } } public override object DeepCopyNotNull(object value) { Index: Int32Type.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/Int32Type.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Int32Type.cs 18 May 2004 05:04:12 -0000 1.3 --- Int32Type.cs 21 Aug 2004 16:37:33 -0000 1.4 *************** *** 8,12 **** public class Int32Type : PrimitiveType, IDiscriminatorType, IVersionType { ! internal Int32Type(Int32SqlType sqlType) : base(sqlType) { } --- 8,13 ---- public class Int32Type : PrimitiveType, IDiscriminatorType, IVersionType { ! internal Int32Type() : base( new Int32SqlType() ) ! { } Index: TicksType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/TicksType.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TicksType.cs 18 May 2004 05:04:12 -0000 1.3 --- TicksType.cs 21 Aug 2004 16:37:33 -0000 1.4 *************** *** 17,22 **** public class TicksType : MutableType, IVersionType, ILiteralType { ! ! public TicksType(Int64SqlType sqlType) : base(sqlType) { } --- 17,21 ---- public class TicksType : MutableType, IVersionType, ILiteralType { ! internal TicksType() : base( new Int64SqlType() ) { } Index: ObjectType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/ObjectType.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ObjectType.cs 9 Aug 2004 03:09:25 -0000 1.6 --- ObjectType.cs 21 Aug 2004 16:37:33 -0000 1.7 *************** *** 43,53 **** private readonly IType metaType; ! public ObjectType(IType metaType, IType identifierType) { this.identifierType = identifierType; this.metaType = metaType; } ! public ObjectType() : this(TypeFactory.GetTypeType(), TypeFactory.GetSerializableType()) { ! //NHibernate.Class, NHibernate.Serializable) { } --- 43,53 ---- private readonly IType metaType; ! internal ObjectType(IType metaType, IType identifierType) { this.identifierType = identifierType; this.metaType = metaType; } ! internal ObjectType() : this(NHibernate.Class, NHibernate.Serializable) ! { } Index: AnsiStringType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/AnsiStringType.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AnsiStringType.cs 18 May 2004 05:04:12 -0000 1.2 --- AnsiStringType.cs 21 Aug 2004 16:37:32 -0000 1.3 *************** *** 12,15 **** --- 12,18 ---- public class AnsiStringType : ImmutableType, IDiscriminatorType { + internal AnsiStringType() : base( new AnsiStringSqlType() ) + { + } internal AnsiStringType(AnsiStringSqlType sqlType) : base(sqlType) {} Index: TimestampType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/TimestampType.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** TimestampType.cs 29 Jul 2004 13:04:24 -0000 1.6 --- TimestampType.cs 21 Aug 2004 16:37:33 -0000 1.7 *************** *** 31,36 **** public class TimestampType : MutableType, IVersionType, ILiteralType { ! ! public TimestampType(DateTimeSqlType sqlType) : base(sqlType) { } --- 31,35 ---- public class TimestampType : MutableType, IVersionType, ILiteralType { ! internal TimestampType() : base( new DateTimeSqlType() ) { } Index: DateTimeType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/DateTimeType.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DateTimeType.cs 18 May 2004 05:04:12 -0000 1.6 --- DateTimeType.cs 21 Aug 2004 16:37:32 -0000 1.7 *************** *** 19,23 **** { ! public DateTimeType(DateTimeSqlType sqlType) : base(sqlType) { } --- 19,23 ---- { ! internal DateTimeType() : base( new DateTimeSqlType() ) { } Index: StringType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/StringType.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** StringType.cs 18 May 2004 05:04:12 -0000 1.4 --- StringType.cs 21 Aug 2004 16:37:33 -0000 1.5 *************** *** 13,16 **** --- 13,20 ---- public class StringType : ImmutableType, IDiscriminatorType { + internal StringType() : base( new StringSqlType() ) + { + } + internal StringType(StringSqlType sqlType) : base(sqlType) { } Index: DoubleType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/DoubleType.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DoubleType.cs 18 May 2004 05:04:12 -0000 1.4 --- DoubleType.cs 21 Aug 2004 16:37:32 -0000 1.5 *************** *** 8,12 **** public class DoubleType : PrimitiveType { ! internal DoubleType(DoubleSqlType sqlType) : base(sqlType) { } --- 8,13 ---- public class DoubleType : PrimitiveType { ! internal DoubleType() : base( new DoubleSqlType() ) ! { } Index: TimeSpanType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/TimeSpanType.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TimeSpanType.cs 18 May 2004 05:04:12 -0000 1.3 --- TimeSpanType.cs 21 Aug 2004 16:37:33 -0000 1.4 *************** *** 12,17 **** public class TimeSpanType : MutableType, IVersionType, ILiteralType { ! ! public TimeSpanType(Int64SqlType sqlType) : base(sqlType) { } --- 12,16 ---- public class TimeSpanType : MutableType, IVersionType, ILiteralType { ! internal TimeSpanType() : base( new Int64SqlType() ) { } Index: TrueFalseType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/TrueFalseType.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TrueFalseType.cs 18 Jul 2004 03:06:13 -0000 1.3 --- TrueFalseType.cs 21 Aug 2004 16:37:33 -0000 1.4 *************** *** 19,24 **** public class TrueFalseType: CharBooleanType { ! ! internal TrueFalseType(AnsiStringFixedLengthSqlType sqlType) : base(sqlType) { } --- 19,24 ---- public class TrueFalseType: CharBooleanType { ! internal TrueFalseType() : base( new AnsiStringFixedLengthSqlType(1) ) ! { } |
From: Michael D. <mik...@us...> - 2004-08-21 16:37:43
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22069/NHibernate Modified Files: NHibernate.cs Log Message: modified Types so that the mapping type="" would be h2.0.3 compatible to allow people to use h2.0.3 existing tools for code generation. Index: NHibernate.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/NHibernate.cs,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** NHibernate.cs 3 Aug 2004 04:18:44 -0000 1.19 --- NHibernate.cs 21 Aug 2004 16:37:32 -0000 1.20 *************** *** 2,9 **** using System.IO; using NHibernate.SqlTypes; using NHibernate.Type; - using NHibernate.Proxy; - using NHibernate.Collection; namespace NHibernate { --- 2,9 ---- using System.IO; + using NHibernate.Collection; + using NHibernate.Proxy; using NHibernate.SqlTypes; using NHibernate.Type; namespace NHibernate { *************** *** 19,144 **** /// NHibernate Ansi String type /// </summary> ! public static readonly NullableType AnsiString = TypeFactory.GetAnsiStringType(); /// <summary> /// NHibernate binary type /// </summary> ! public static readonly NullableType Binary = TypeFactory.GetBinaryType(); /// <summary> /// NHibernate boolean type /// </summary> ! public static readonly NullableType Boolean = TypeFactory.GetBooleanType(); /// <summary> /// NHibernate byte type /// </summary> ! public static readonly NullableType Byte = TypeFactory.GetByteType() ; /// <summary> /// NHibernate character type /// </summary> ! public static readonly NullableType Character = TypeFactory.GetCharType(); /// <summary> - /// NHibernate class type - /// </summary> - public static readonly NullableType Class = TypeFactory.GetTypeType(); - - /// <summary> /// NHibernate CultureInfo type /// </summary> ! public static readonly NullableType CultureInfo = TypeFactory.GetCultureInfoType(); /// <summary> /// NHibernate date type /// </summary> ! public static readonly NullableType DateTime = TypeFactory.GetDateTimeType(); /// <summary> /// NHibernate date type /// </summary> ! public static readonly NullableType Date = TypeFactory.GetDateType(); /// <summary> /// NHibernate decimal type /// </summary> ! public static readonly NullableType Decimal = TypeFactory.GetDecimalType(); /// <summary> /// NHibernate double type /// </summary> ! public static readonly NullableType Double = TypeFactory.GetDoubleType(); /// <summary> /// NHibernate Guid type. /// </summary> ! public static readonly NullableType Guid = TypeFactory.GetGuidType(); /// <summary> /// NHibernate System.Int16 (short in C#) type /// </summary> ! public static readonly NullableType Int16 = TypeFactory.GetInt16Type(); /// <summary> /// NHibernate System.Int32 (int in C#) type /// </summary> ! public static readonly NullableType Int32 = TypeFactory.GetInt32Type(); /// <summary> /// NHibernate System.Int64 (long in C#) type /// </summary> ! public static readonly NullableType Int64 = TypeFactory.GetInt64Type(); ! ! /// <summary> ! /// NHibernate System.Object type ! /// </summary> ! public static readonly IType Object = TypeFactory.GetObjectType(); ! ! /// <summary> ! /// NHibernate serializable type ! /// </summary> ! public static readonly NullableType Serializable = TypeFactory.GetSerializableType(); /// <summary> /// NHIbernate System.Single (float in C#) Type /// </summary> ! public static readonly NullableType Single = TypeFactory.GetSingleType(); /// <summary> /// NHibernate String type /// </summary> ! public static readonly NullableType String = TypeFactory.GetStringType(); /// <summary> /// NHibernate Time type /// </summary> ! public static readonly NullableType Time = TypeFactory.GetTimeType(); /// <summary> /// NHibernate Ticks type /// </summary> ! public static readonly NullableType Ticks = TypeFactory.GetTicksType(); /// <summary> /// NHibernate Ticks type /// </summary> ! public static readonly NullableType TimeSpan = TypeFactory.GetTimeSpanType(); /// <summary> /// NHibernate Timestamp type /// </summary> ! public static readonly NullableType Timestamp = TypeFactory.GetTimestampType(); //new TimestampType(); /// <summary> /// NHibernate TrueFalse type /// </summary> ! public static readonly NullableType TrueFalse = TypeFactory.GetTrueFalseType(); /// <summary> /// NHibernate YesNo type /// </summary> ! public static readonly NullableType YesNo = TypeFactory.GetYesNoType(); /// <summary> /// NHibernate blob type --- 19,145 ---- /// NHibernate Ansi String type /// </summary> ! public static readonly NullableType AnsiString = new AnsiStringType(); /// <summary> /// NHibernate binary type /// </summary> ! public static readonly NullableType Binary = new BinaryType(); /// <summary> /// NHibernate boolean type /// </summary> ! public static readonly NullableType Boolean = new BooleanType(); /// <summary> /// NHibernate byte type /// </summary> ! public static readonly NullableType Byte = new ByteType(); /// <summary> /// NHibernate character type /// </summary> ! public static readonly NullableType Character = new CharType(); /// <summary> /// NHibernate CultureInfo type /// </summary> ! public static readonly NullableType CultureInfo = new CultureInfoType(); /// <summary> /// NHibernate date type /// </summary> ! public static readonly NullableType DateTime = new DateTimeType(); /// <summary> /// NHibernate date type /// </summary> ! public static readonly NullableType Date = new DateType(); /// <summary> /// NHibernate decimal type /// </summary> ! public static readonly NullableType Decimal = new DecimalType(); /// <summary> /// NHibernate double type /// </summary> ! public static readonly NullableType Double = new DoubleType(); /// <summary> /// NHibernate Guid type. /// </summary> ! public static readonly NullableType Guid = new GuidType(); /// <summary> /// NHibernate System.Int16 (short in C#) type /// </summary> ! public static readonly NullableType Int16 = new Int16Type(); /// <summary> /// NHibernate System.Int32 (int in C#) type /// </summary> ! public static readonly NullableType Int32 = new Int32Type(); /// <summary> /// NHibernate System.Int64 (long in C#) type /// </summary> ! public static readonly NullableType Int64 = new Int64Type(); /// <summary> /// NHIbernate System.Single (float in C#) Type /// </summary> ! public static readonly NullableType Single = new SingleType(); /// <summary> /// NHibernate String type /// </summary> ! public static readonly NullableType String = new StringType(); /// <summary> /// NHibernate Time type /// </summary> ! public static readonly NullableType Time = new TimeType(); /// <summary> /// NHibernate Ticks type /// </summary> ! public static readonly NullableType Ticks = new TicksType(); /// <summary> /// NHibernate Ticks type /// </summary> ! public static readonly NullableType TimeSpan = new TimeSpanType(); /// <summary> /// NHibernate Timestamp type /// </summary> ! public static readonly NullableType Timestamp = new TimestampType(); /// <summary> /// NHibernate TrueFalse type /// </summary> ! public static readonly NullableType TrueFalse = new TrueFalseType(); /// <summary> /// NHibernate YesNo type /// </summary> ! public static readonly NullableType YesNo = new YesNoType(); ! ! /// <summary> ! /// NHibernate class type ! /// </summary> ! public static readonly NullableType Class = new TypeType(); ! ! /// <summary> ! /// NHibernate serializable type ! /// </summary> ! public static readonly NullableType Serializable = new SerializableType(); ! ! /// <summary> ! /// NHibernate System.Object type ! /// </summary> ! public static readonly IType Object = new ObjectType(); + /// <summary> /// NHibernate blob type *************** *** 154,158 **** /// Cannot be instantiated. /// </summary> ! private NHibernate() { throw new NotSupportedException(); } --- 155,160 ---- /// Cannot be instantiated. /// </summary> ! private NHibernate() ! { throw new NotSupportedException(); } |
From: Michael D. <mik...@us...> - 2004-08-21 13:08:20
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlCommand In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26366 Added Files: QuerySelect.cs Log Message: Forgot to commit this file before removing it from the Sql namespace. --- NEW FILE: QuerySelect.cs --- using System; using System.Text; using System.Collections; using NHibernate.Dialect; using NHibernate.Util; namespace NHibernate.SqlCommand { /// <summary> /// Summary description for QuerySelect. /// </summary> public class QuerySelect { private JoinFragment joins; // the selectBuilder could probably be a string if the Persister's methods that build // the SqlString instead returned a String. private SqlStringBuilder selectBuilder = new SqlStringBuilder(); private SqlStringBuilder whereBuilder = new SqlStringBuilder(); // groupBy, orderBy, and having will for sure have no parameters. private StringBuilder groupBy = new StringBuilder(); private StringBuilder orderBy = new StringBuilder(); private StringBuilder having = new StringBuilder(); private bool distinct = false; private static readonly IList dontSpace = new ArrayList(); static QuerySelect() { //dontSpace.add("'"); dontSpace.Add("."); dontSpace.Add("+"); dontSpace.Add("-"); dontSpace.Add("/"); dontSpace.Add("*"); dontSpace.Add("<"); dontSpace.Add(">"); dontSpace.Add("="); dontSpace.Add("#"); dontSpace.Add("~"); dontSpace.Add("|"); dontSpace.Add("&"); dontSpace.Add("<="); dontSpace.Add(">="); dontSpace.Add("=>"); dontSpace.Add("=<"); dontSpace.Add("!="); dontSpace.Add("<>"); dontSpace.Add("!#"); dontSpace.Add("!~"); dontSpace.Add("!<"); dontSpace.Add("!>"); dontSpace.Add(StringHelper.OpenParen); //for MySQL dontSpace.Add(StringHelper.ClosedParen); } public QuerySelect(Dialect.Dialect dialect) { joins = new QueryJoinFragment(dialect, false); } public JoinFragment JoinFragment { get { return joins; } } public void AddSelectFragmentString(string fragment) { AddSelectFragmentString( new SqlString(fragment) ); } public void AddSelectFragmentString(SqlString fragment) { if( fragment.SqlParts.Length>0 && fragment.StartsWith(",") ) { fragment = fragment.Substring(1); } fragment = fragment.Trim(); if( fragment.SqlParts.Length > 0 ) { if( selectBuilder.Count > 0 ) { selectBuilder.Add(StringHelper.CommaSpace); } selectBuilder.Add(fragment); } } public void AddSelectColumn(string columnName, string alias) { AddSelectFragmentString(columnName + ' ' + alias); } public bool Distinct { set { this.distinct = value; } } public void SetWhereTokens(ICollection tokens) { //if ( conjunctiveWhere.length()>0 ) conjunctiveWhere.append(" and "); AppendTokens(whereBuilder, tokens); //AppendTokens(where, tokens); } public void SetGroupByTokens(ICollection tokens) { //if ( groupBy.length()>0 ) groupBy.append(" and "); AppendTokens(groupBy, tokens); } public void SetOrderByTokens(ICollection tokens) { //if ( orderBy.length()>0 ) orderBy.append(" and "); AppendTokens(orderBy, tokens); } public void SetHavingTokens(ICollection tokens) { //if ( having.length()>0 ) having.append(" and "); AppendTokens(having, tokens); } public void AddOrderBy(string orderByString) { if( orderBy.Length > 0 ) orderBy.Append(StringHelper.CommaSpace); orderBy.Append(orderByString); } public SqlString ToQuerySqlString() { SqlStringBuilder builder = new SqlStringBuilder(); builder.Add("select "); if (distinct) builder.Add("distinct "); SqlString from = joins.ToFromFragmentString; if ( from.StartsWith(",") ) { from = from.Substring(1); } else if ( from.StartsWith(" inner join") ) { from = from.Substring(11); } builder.Add(selectBuilder.ToSqlString()) .Add(" from") .Add( from ); SqlString part1 = joins.ToWhereFragmentString.Trim(); SqlString part2 = whereBuilder.ToSqlString().Trim(); bool hasPart1 = part1.SqlParts.Length > 0; bool hasPart2 = part2.SqlParts.Length > 0; if (hasPart1 || hasPart2) builder.Add(" where "); if (hasPart1) builder.Add( part1.Substring(4) ); if (hasPart2) { if (hasPart1) builder.Add(" and ("); builder.Add(part2); if (hasPart1) builder.Add(")"); } if ( groupBy.Length > 0 ) builder.Add(" group by ").Add( groupBy.ToString() ); if ( having.Length > 0 ) builder.Add(" having ").Add( having.ToString() ); if ( orderBy.Length > 0 ) builder.Add(" order by ").Add( orderBy.ToString() ); return builder.ToSqlString(); } private void AppendTokens(StringBuilder buf, ICollection iter) { bool lastSpaceable = true; bool lastQuoted = false; int debugIndex = 0; foreach(string token in iter) { bool spaceable = !dontSpace.Contains(token); bool quoted = token.StartsWith("'"); if (spaceable && lastSpaceable) { if (!quoted || !lastQuoted) buf.Append(' '); } lastSpaceable = spaceable; buf.Append(token); lastQuoted = token.EndsWith("'"); debugIndex++; } } private void AppendTokens(SqlStringBuilder builder, ICollection iter) { bool lastSpaceable = true; bool lastQuoted = false; int debugIndex = 0; foreach(object token in iter) { string tokenString = token as string; SqlString tokenSqlString = token as SqlString; bool spaceable = !dontSpace.Contains(token); bool quoted = false; //TODO: seems HACKish to cast between String and SqlString if(tokenString!=null) { quoted = tokenString.StartsWith("'"); } else { quoted = tokenSqlString.StartsWith("'"); } if (spaceable && lastSpaceable) { if (!quoted || !lastQuoted) builder.Add(" "); } lastSpaceable = spaceable; if( token.Equals(StringHelper.SqlParameter) ) { Parameter param = new Parameter(); param.Name = "placholder"; builder.Add(param); } else { // not sure if we have a string or a SqlString here and token is a // reference to an object - so let the builder figure out what the // actual object is builder.AddObject(token); } debugIndex++; if( tokenString!=null) { lastQuoted = tokenString.EndsWith("'"); } else { tokenSqlString.EndsWith("'"); } } } } } |
From: Michael D. <mik...@us...> - 2004-08-20 17:39:12
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Type In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17702/Type Modified Files: AbstractType.cs BinaryType.cs BooleanType.cs CharBooleanType.cs CharType.cs IType.cs ManyToOneType.cs NullableType.cs OneToOneType.cs PersistentCollectionType.cs Log Message: Moved QuerySelect to SqlCommand folder and removed all "using NHibernate.Sql" because that namespace has been completely refactored to SqlCommand. There were also some classes with the using that had no reason to have a "using NHibernate.SqlCommand;" Index: CharBooleanType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/CharBooleanType.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CharBooleanType.cs 18 May 2004 05:04:12 -0000 1.5 --- CharBooleanType.cs 20 Aug 2004 17:39:01 -0000 1.6 *************** *** 2,6 **** using System.Data; - using NHibernate.Sql; using NHibernate.SqlTypes; --- 2,5 ---- Index: BinaryType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/BinaryType.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** BinaryType.cs 10 Feb 2004 18:41:42 -0000 1.4 --- BinaryType.cs 20 Aug 2004 17:39:01 -0000 1.5 *************** *** 5,9 **** using NHibernate.Cfg; - using NHibernate.Sql; using NHibernate.SqlTypes; --- 5,8 ---- Index: BooleanType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/BooleanType.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** BooleanType.cs 18 May 2004 05:04:12 -0000 1.6 --- BooleanType.cs 20 Aug 2004 17:39:01 -0000 1.7 *************** *** 2,6 **** using System.Data; - using NHibernate.Sql; using NHibernate.SqlTypes; --- 2,5 ---- Index: IType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/IType.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** IType.cs 10 Feb 2004 18:41:42 -0000 1.9 --- IType.cs 20 Aug 2004 17:39:01 -0000 1.10 *************** *** 2,6 **** using System.Data; - using NHibernate.Sql; using NHibernate.SqlTypes; using NHibernate.Engine; --- 2,5 ---- Index: AbstractType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/AbstractType.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** AbstractType.cs 9 Aug 2004 03:09:25 -0000 1.8 --- AbstractType.cs 20 Aug 2004 17:39:01 -0000 1.9 *************** *** 3,7 **** using NHibernate.Engine; - using NHibernate.Sql; using NHibernate.SqlTypes; --- 3,6 ---- Index: PersistentCollectionType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/PersistentCollectionType.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** PersistentCollectionType.cs 16 Aug 2004 05:11:08 -0000 1.13 --- PersistentCollectionType.cs 20 Aug 2004 17:39:01 -0000 1.14 *************** *** 5,9 **** using NHibernate.Collection; using NHibernate.Engine; - using NHibernate.Sql; using NHibernate.SqlTypes; --- 5,8 ---- Index: OneToOneType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/OneToOneType.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** OneToOneType.cs 10 Feb 2004 18:41:42 -0000 1.6 --- OneToOneType.cs 20 Aug 2004 17:39:01 -0000 1.7 *************** *** 2,6 **** using System.Data; - using NHibernate.Sql; using NHibernate.SqlTypes; using NHibernate.Engine; --- 2,5 ---- Index: NullableType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/NullableType.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** NullableType.cs 19 Jul 2004 13:54:24 -0000 1.8 --- NullableType.cs 20 Aug 2004 17:39:01 -0000 1.9 *************** *** 2,6 **** using System.Data; - using NHibernate.Sql; using NHibernate.SqlTypes; using NHibernate.Engine; --- 2,5 ---- Index: ManyToOneType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/ManyToOneType.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ManyToOneType.cs 10 Feb 2004 18:41:42 -0000 1.6 --- ManyToOneType.cs 20 Aug 2004 17:39:01 -0000 1.7 *************** *** 4,8 **** using NHibernate.Mapping; using NHibernate.Engine; - using NHibernate.Sql; using NHibernate.SqlTypes; --- 4,7 ---- Index: CharType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/CharType.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CharType.cs 18 May 2004 05:04:12 -0000 1.2 --- CharType.cs 20 Aug 2004 17:39:01 -0000 1.3 *************** *** 2,6 **** using System.Data; - using NHibernate.Sql; using NHibernate.SqlTypes; --- 2,5 ---- |
From: Michael D. <mik...@us...> - 2004-08-20 17:39:12
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17702/Hql Modified Files: FromParser.cs FromPathExpressionParser.cs PathExpressionParser.cs QueryTranslator.cs WhereParser.cs Log Message: Moved QuerySelect to SqlCommand folder and removed all "using NHibernate.Sql" because that namespace has been completely refactored to SqlCommand. There were also some classes with the using that had no reason to have a "using NHibernate.SqlCommand;" Index: FromPathExpressionParser.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql/FromPathExpressionParser.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FromPathExpressionParser.cs 14 Apr 2004 14:48:47 -0000 1.4 --- FromPathExpressionParser.cs 20 Aug 2004 17:39:02 -0000 1.5 *************** *** 2,6 **** using NHibernate.Type; - using NHibernate.Sql; namespace NHibernate.Hql --- 2,5 ---- Index: WhereParser.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql/WhereParser.cs,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** WhereParser.cs 19 Aug 2004 17:46:38 -0000 1.19 --- WhereParser.cs 20 Aug 2004 17:39:02 -0000 1.20 *************** *** 5,9 **** using NHibernate.Persister; - using NHibernate.Sql; using NHibernate.Type; using NHibernate.Util; --- 5,8 ---- Index: QueryTranslator.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql/QueryTranslator.cs,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** QueryTranslator.cs 20 Aug 2004 15:31:37 -0000 1.40 --- QueryTranslator.cs 20 Aug 2004 17:39:02 -0000 1.41 *************** *** 15,19 **** using NHibernate.Loader; using NHibernate.Persister; - using NHibernate.Sql; using NHibernate.SqlCommand; using NHibernate.Type; --- 15,18 ---- Index: PathExpressionParser.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql/PathExpressionParser.cs,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** PathExpressionParser.cs 19 Aug 2004 17:46:38 -0000 1.16 --- PathExpressionParser.cs 20 Aug 2004 17:39:02 -0000 1.17 *************** *** 2,12 **** using System.Collections; using System.Text; using NHibernate; using NHibernate.Collection; using NHibernate.Persister; using NHibernate.Type; using NHibernate.Util; - using NHibernate.Sql; - using NHibernate.SqlCommand; namespace NHibernate.Hql --- 2,12 ---- using System.Collections; using System.Text; + using NHibernate; using NHibernate.Collection; using NHibernate.Persister; + using NHibernate.SqlCommand; using NHibernate.Type; using NHibernate.Util; namespace NHibernate.Hql Index: FromParser.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql/FromParser.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** FromParser.cs 16 Aug 2004 05:28:22 -0000 1.10 --- FromParser.cs 20 Aug 2004 17:39:02 -0000 1.11 *************** *** 4,8 **** using NHibernate; using NHibernate.Persister; - using NHibernate.Sql; using NHibernate.SqlCommand; using NHibernate.Util; --- 4,7 ---- |
From: Michael D. <mik...@us...> - 2004-08-20 17:39:12
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Sql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17702/Sql Removed Files: QuerySelect.cs Log Message: Moved QuerySelect to SqlCommand folder and removed all "using NHibernate.Sql" because that namespace has been completely refactored to SqlCommand. There were also some classes with the using that had no reason to have a "using NHibernate.SqlCommand;" --- QuerySelect.cs DELETED --- |