forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIEventSource.cs
52 lines (42 loc) · 1.81 KB
/
IEventSource.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
using System;
using System.Collections;
using System.Collections.Generic;
using NHibernate.Engine;
using NHibernate.Persister.Entity;
namespace NHibernate.Event
{
public partial interface IEventSource : ISessionImplementor, ISession
{
/// <summary> Get the ActionQueue for this session</summary>
ActionQueue ActionQueue { get; }
/// <summary>
/// Is auto-flush suspended?
/// </summary>
bool AutoFlushSuspended { get; }
//6.0 TODO Remove it (it's added directly to ISessionImplementor)
/// <summary>
/// Instantiate an entity instance, using either an interceptor,
/// or the given persister
/// </summary>
object Instantiate(IEntityPersister persister, object id);
/// <summary> Force an immediate flush</summary>
void ForceFlush(EntityEntry e);
/// <summary> Cascade merge an entity instance</summary>
void Merge(string entityName, object obj, IDictionary copiedAlready);
/// <summary> Cascade persist an entity instance</summary>
void Persist(string entityName, object obj, IDictionary createdAlready);
/// <summary> Cascade persist an entity instance during the flush process</summary>
void PersistOnFlush(string entityName, object obj, IDictionary copiedAlready);
/// <summary> Cascade refresh an entity instance</summary>
void Refresh(object obj, IDictionary refreshedAlready);
/// <summary> Cascade delete an entity instance</summary>
void Delete(string entityName, object child, bool isCascadeDeleteEnabled, ISet<object> transientEntities);
// 6.0 TODO: yield null if already suspended.
/// <summary>
/// Suspend auto-flushing, yielding a disposable to dispose when auto flush should be restored. Supports
/// being called multiple times.
/// </summary>
/// <returns>A disposable to dispose when auto flush should be restored.</returns>
IDisposable SuspendAutoFlush();
}
}