From: Paul H. <pha...@us...> - 2005-03-14 19:04:29
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9971/nhibernate/src/NHibernate.DomainModel Modified Files: CustomPersister.cs Log Message: Refactored as per 2.1 Index: CustomPersister.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/CustomPersister.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CustomPersister.cs 6 Mar 2005 12:44:32 -0000 1.5 --- CustomPersister.cs 14 Mar 2005 19:04:11 -0000 1.6 *************** *** 18,22 **** public class CustomPersister : IClassPersister { - private static readonly Hashtable Instances = new Hashtable(); private static readonly IIdentifierGenerator Generator = new CounterGenerator(); --- 18,21 ---- *************** *** 60,63 **** --- 59,67 ---- } + public int[] FindModified(object[] x, object[] y, object owner, ISessionImplementor session) + { + return FindDirty( x, y, owner, session ); + } + public bool[] PropertyUpdateability { *************** *** 75,78 **** --- 79,87 ---- } + public bool IsCacheInvalidationRequired + { + get { return false; } + } + public bool HasCascades { *************** *** 229,233 **** } ! public void Update(object id, object[] fields, int[] dirtyFields, object oldVersion, object obj, ISessionImplementor session) { Instances[id] = ( (Custom)obj).Clone(); --- 238,242 ---- } ! public void Update(object id, object[] fields, int[] dirtyFields, object[] oldFields, object oldVersion, object obj, ISessionImplementor session) { Instances[id] = ( (Custom)obj).Clone(); *************** *** 299,302 **** --- 308,319 ---- } + /// <summary> + /// + /// </summary> + /// <param name="id"></param> + /// <param name="version"></param> + /// <param name="obj"></param> + /// <param name="lockMode"></param> + /// <param name="session"></param> public void Lock(object id, object version, object obj, LockMode lockMode, ISessionImplementor session) { *************** *** 304,307 **** --- 321,346 ---- } + /// <summary> + /// + /// </summary> + /// <param name="id"></param> + /// <param name="version"></param> + /// <param name="session"></param> + /// <returns></returns> + public object[] GetCurrentPersistentState( object id, object version, ISessionImplementor session ) + { + return null; + } + + /// <summary> + /// + /// </summary> + /// <param name="id"></param> + /// <param name="session"></param> + /// <returns></returns> + public object CurrentVersion( object id, ISessionImplementor session ) + { + return this; + } #endregion } |