From: Sergey K. <jus...@us...> - 2005-02-11 21:27:11
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5205/src/NHibernate Modified Files: ISession.cs Log Message: ISession.Get implementation (both overloads), including a test Index: ISession.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/ISession.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ISession.cs 1 Jan 2005 03:33:40 -0000 1.13 --- ISession.cs 11 Feb 2005 21:26:21 -0000 1.14 *************** *** 53,57 **** /// } catch (Exception e) { /// if (tx != null) tx.Rollback(); ! /// throw e; /// } finally { /// sess.Close(); --- 53,57 ---- /// } catch (Exception e) { /// if (tx != null) tx.Rollback(); ! /// throw; /// } finally { /// sess.Close(); *************** *** 193,196 **** --- 193,217 ---- /// <summary> + /// Return the persistent instance of the given entity class with the given identifier, or null + /// if there is no such persistent instance. (If the instance, or a proxy for the instance, is + /// already associated with the session, return that instance or proxy.) + /// </summary> + /// <param name="clazz">a persistent class</param> + /// <param name="id">an identifier</param> + /// <returns>a persistent instance or null</returns> + object Get(System.Type clazz, object id); + + /// <summary> + /// Return the persistent instance of the given entity class with the given identifier, or null + /// if there is no such persistent instance. Obtain the specified lock mode if the instance + /// exists. + /// </summary> + /// <param name="clazz">a persistent class</param> + /// <param name="id">an identifier</param> + /// <param name="lockMode">the lock mode</param> + /// <returns>a persistent instance or null</returns> + object Get(System.Type clazz, object id, LockMode lockMode); + + /// <summary> /// Persist the given transient instance, first assigning a generated identifier. /// </summary> |