From: Michael D. <mik...@us...> - 2005-04-17 17:16:15
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Type In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10283/NHibernate/Type Modified Files: ComponentType.cs CompositeCustomType.cs IAbstractComponentType.cs ObjectType.cs Log Message: Fixed up the QBE portion of NHibernate.Expression. Index: CompositeCustomType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/CompositeCustomType.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CompositeCustomType.cs 1 Mar 2005 16:24:50 -0000 1.5 --- CompositeCustomType.cs 17 Apr 2005 17:16:06 -0000 1.6 *************** *** 71,83 **** public virtual object[ ] GetPropertyValues( object component, ISessionImplementor session ) { int len = Subtypes.Length; object[ ] result = new object[len]; for( int i = 0; i < len; i++ ) { ! result[ i ] = GetPropertyValue( component, i, session ); } return result; } - /// <summary> /// --- 71,87 ---- public virtual object[ ] GetPropertyValues( object component, ISessionImplementor session ) { + return GetPropertyValues( component ); + } + + public object[] GetPropertyValues(object component) + { int len = Subtypes.Length; object[ ] result = new object[len]; for( int i = 0; i < len; i++ ) { ! result[ i ] = GetPropertyValue( component, i ); } return result; } /// <summary> /// *************** *** 102,105 **** --- 106,114 ---- public virtual object GetPropertyValue( object component, int i, ISessionImplementor session ) { + return GetPropertyValue( component, i ); + } + + public object GetPropertyValue( object component, int i ) + { return userType.GetPropertyValue( component, i ); } Index: ComponentType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/ComponentType.cs,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ComponentType.cs 14 Mar 2005 18:54:20 -0000 1.14 --- ComponentType.cs 17 Apr 2005 17:16:06 -0000 1.15 *************** *** 68,72 **** /// </summary> /// <param name="componentClass"></param> ! /// <param name="properties"></param> /// <param name="propertyGetters"></param> /// <param name="propertySetters"></param> --- 68,72 ---- /// </summary> /// <param name="componentClass"></param> ! /// <param name="propertyNames"></param> /// <param name="propertyGetters"></param> /// <param name="propertySetters"></param> *************** *** 76,82 **** /// <param name="cascade"></param> /// <param name="parentProperty"></param> - /// <param name="embedded"></param> public ComponentType( System.Type componentClass, ! string[ ] properties, IGetter[ ] propertyGetters, ISetter[ ] propertySetters, --- 76,81 ---- /// <param name="cascade"></param> /// <param name="parentProperty"></param> public ComponentType( System.Type componentClass, ! string[ ] propertyNames, IGetter[ ] propertyGetters, ISetter[ ] propertySetters, *************** *** 85,94 **** OuterJoinFetchStrategy[ ] joinedFetch, Cascades.CascadeStyle[ ] cascade, ! string parentProperty, ! bool embedded ) // not used !?! { this.componentClass = componentClass; this.propertyTypes = propertyTypes; ! propertySpan = properties.Length; getters = propertyGetters; setters = propertySetters; --- 84,92 ---- OuterJoinFetchStrategy[ ] joinedFetch, Cascades.CascadeStyle[ ] cascade, ! string parentProperty) { this.componentClass = componentClass; this.propertyTypes = propertyTypes; ! propertySpan = propertyNames.Length; getters = propertyGetters; setters = propertySetters; *************** *** 114,118 **** parentGetter = pa.GetGetter( componentClass, parentProperty ); } ! this.propertyNames = properties; this.cascade = cascade; this.joinedFetch = joinedFetch; --- 112,116 ---- parentGetter = pa.GetGetter( componentClass, parentProperty ); } ! this.propertyNames = propertyNames; this.cascade = cascade; this.joinedFetch = joinedFetch; Index: IAbstractComponentType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/IAbstractComponentType.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** IAbstractComponentType.cs 1 Mar 2005 16:24:50 -0000 1.9 --- IAbstractComponentType.cs 17 Apr 2005 17:16:06 -0000 1.10 *************** *** 24,28 **** /// <summary> ! /// /// </summary> /// <param name="component"></param> --- 24,35 ---- /// <summary> ! /// Optional Operation ! /// </summary> ! /// <param name="component"></param> ! /// <returns></returns> ! object[] GetPropertyValues(object component); ! ! /// <summary> ! /// Optional operation /// </summary> /// <param name="component"></param> Index: ObjectType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/ObjectType.cs,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ObjectType.cs 14 Mar 2005 18:54:20 -0000 1.12 --- ObjectType.cs 17 Apr 2005 17:16:06 -0000 1.13 *************** *** 343,346 **** --- 343,351 ---- } + public object[] GetPropertyValues( object component ) + { + throw new NotSupportedException(); + } + /// <summary></summary> public override bool IsComponentType |