From: Paul H. <pha...@us...> - 2005-03-06 12:44:59
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Mapping In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21577/nhibernate/src/NHibernate/Mapping Modified Files: NamedSQLQuery.cs PersistentClass.cs Log Message: Refactored SessionImpl as per 2.1 for Save/Update Index: PersistentClass.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Mapping/PersistentClass.cs,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** PersistentClass.cs 1 Mar 2005 16:24:49 -0000 1.19 --- PersistentClass.cs 6 Mar 2005 12:44:44 -0000 1.20 *************** *** 17,28 **** private static readonly Alias PKAlias = new Alias( 15, "PK" ); ! /// <summary> ! /// ! /// </summary> ! public static readonly string NullDiscriminatorMapping = "null"; ! /// <summary> ! /// ! /// </summary> ! public static readonly string NotNullDiscriminatorMapping = "not null"; private System.Type mappedClass; --- 17,24 ---- private static readonly Alias PKAlias = new Alias( 15, "PK" ); ! /// <summary></summary> ! public const string NullDiscriminatorMapping = "null"; ! /// <summary></summary> ! public const string NotNullDiscriminatorMapping = "not null"; private System.Type mappedClass; *************** *** 37,43 **** private bool dynamicUpdate; private int batchSize = 1; ! //private bool selectBeforeUpdate; ! //private int optimisticLockMode; ! //private IDictionary metaAttributes; /// <summary> --- 33,39 ---- private bool dynamicUpdate; private int batchSize = 1; ! private bool selectBeforeUpdate; ! private int optimisticLockMode; ! private IDictionary metaAttributes; /// <summary> *************** *** 539,542 **** --- 535,573 ---- /// <summary> + /// + /// </summary> + public bool SelectBeforeUpdate + { + get { return selectBeforeUpdate; } + set { selectBeforeUpdate = value; } + } + + /// <summary> + /// + /// </summary> + /// <param name="propertyName"></param> + /// <returns></returns> + public Property GetProperty( string propertyName ) + { + foreach( Property prop in PropertyClosureCollection ) + { + if ( prop.Name == propertyName ) + { + return prop; + } + } + throw new MappingException( string.Format( "property not found: {0}", propertyName ) ); + } + + /// <summary> + /// + /// </summary> + public int OptimisticLockMode + { + get { return optimisticLockMode; } + set { optimisticLockMode = value; } + } + + /// <summary> /// When implemented by a class, gets or sets the sql string that should /// be a part of the where clause. Index: NamedSQLQuery.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Mapping/NamedSQLQuery.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NamedSQLQuery.cs 1 Mar 2005 16:24:49 -0000 1.1 --- NamedSQLQuery.cs 6 Mar 2005 12:44:44 -0000 1.2 *************** *** 37,43 **** /// /// </summary> ! public string[] ReturnClasses { ! get { return (string[]) aliasedClasses.ToArray( typeof( string[ ] ) ); } } --- 37,43 ---- /// /// </summary> ! public System.Type[] ReturnClasses { ! get { return (System.Type[]) aliasedClasses.ToArray( typeof( string[ ] ) ); } } *************** *** 72,76 **** /// <param name="alias"></param> /// <param name="clazz"></param> ! public void AddAliasedClass( string alias, object clazz) { aliases.Add( alias ); --- 72,76 ---- /// <param name="alias"></param> /// <param name="clazz"></param> ! public void AddAliasedClass( string alias, System.Type clazz) { aliases.Add( alias ); |