forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPreUpdateEvent.cs
29 lines (26 loc) · 895 Bytes
/
PreUpdateEvent.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using NHibernate.Persister.Entity;
namespace NHibernate.Event
{
/// <summary>
/// Represents a <tt>pre-update</tt> event, which occurs just prior to
/// performing the update of an entity in the database.
/// </summary>
public class PreUpdateEvent : AbstractPreDatabaseOperationEvent
{
public PreUpdateEvent(object entity, object id, object[] state, object[] oldState, IEntityPersister persister,
IEventSource source) : base(source, entity, id, persister)
{
State = state;
OldState = oldState;
}
/// <summary>
/// Retrieves the state to be used in the update.
/// </summary>
public object[] State { get; private set; }
/// <summary>
/// The old state of the entity at the time it was last loaded from the
/// database; can be null in the case of detached entities.
/// </summary>
public object[] OldState { get; private set; }
}
}