FindDirty() защищенный Метод

Called from Flush(). The return value determines whether the entity is updated
an array of property indicies - the entity is dirty an empty array - the entity is not dirty null - use Hibernate's default dirty-checking algorithm
protected FindDirty ( object id, IDictionary previousState, IDictionary currentState, IType types ) : int[]
id object
previousState IDictionary
currentState IDictionary
types IType
Результат int[]
Пример #1
0
        /// <summary>
        /// Called from <c>Flush()</c>. The return value determines whether the entity is updated
        /// </summary>
        /// <remarks>
        ///		<list>
        ///			<item>an array of property indicies - the entity is dirty</item>
        ///			<item>an empty array - the entity is not dirty</item>
        ///			<item><c>null</c> - use Hibernate's default dirty-checking algorithm</item>
        ///		</list>
        /// </remarks>
        /// <param name="entity">A persistent entity</param>
        /// <param name="currentState"></param>
        /// <param name="id"></param>
        /// <param name="previousState"></param>
        /// <param name="propertyNames"></param>
        /// <param name="types"></param>
        /// <returns>An array of dirty property indicies or <c>null</c> to choose default behavior</returns>
        public override int[] FindDirty(object entity, object id, object[] currentState, object[] previousState, string[] propertyNames, IType[] types)
        {
            ActiveRecordHooksBase hookTarget = entity as ActiveRecordHooksBase;

            if (hookTarget != null)
            {
                return(hookTarget.FindDirty(id, new DictionaryAdapter(propertyNames, previousState), new DictionaryAdapter(propertyNames, currentState), types));
            }

            return(null);
        }