-
Notifications
You must be signed in to change notification settings - Fork 934
/
Copy pathIPersistentIdentifierGenerator.cs
42 lines (39 loc) · 1.43 KB
/
IPersistentIdentifierGenerator.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
using System;
namespace NHibernate.Id
{
/// <summary>
/// An <see cref="IIdentifierGenerator" /> that requires creation of database objects
/// All <see cref="IPersistentIdentifierGenerator"/>s that also implement
/// An <see cref="IConfigurable" /> have access to a special mapping parameter: schema
/// </summary>
public interface IPersistentIdentifierGenerator : IIdentifierGenerator
{
/// <summary>
/// The SQL required to create the underlying database objects
/// </summary>
/// <param name="dialect">The <see cref="Dialect.Dialect"/> to help with creating the sql.</param>
/// <returns>
/// An array of <see cref="String"/> objects that contain the sql to create the
/// necessary database objects.
/// </returns>
string[] SqlCreateStrings(Dialect.Dialect dialect);
/// <summary>
/// The SQL required to remove the underlying database objects
/// </summary>
/// <param name="dialect">The <see cref="Dialect.Dialect"/> to help with creating the sql.</param>
/// <returns>
/// A <see cref="String"/> that will drop the database objects.
/// </returns>
string SqlDropString(Dialect.Dialect dialect);
/// <summary>
/// Return a key unique to the underlying database objects.
/// </summary>
/// <returns>
/// A key unique to the underlying database objects.
/// </returns>
/// <remarks>
/// Prevents us from trying to create/remove them multiple times
/// </remarks>
object GeneratorKey();
}
}