forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIPropertyMapper.cs
39 lines (37 loc) · 1.13 KB
/
IPropertyMapper.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
using NHibernate.Mapping.ByCode.Impl;
using NHibernate.Type;
namespace NHibernate.Mapping.ByCode
{
// 6.0 TODO: inherit from IColumnsAndFormulasMapper
public interface IPropertyMapper : IEntityPropertyMapper, IColumnsMapper
{
void Type(IType persistentType);
void Type<TPersistentType>();
void Type<TPersistentType>(object parameters);
void Type(System.Type persistentType, object parameters);
void Length(int length);
void Precision(short precision);
void Scale(short scale);
void NotNullable(bool notnull);
void Unique(bool unique);
void UniqueKey(string uniquekeyName);
void Index(string indexName);
// 6.0 TODO: remove once inherited from IColumnsAndFormulasMapper
void Formula(string formula);
void Update(bool consideredInUpdateQuery);
void Insert(bool consideredInInsertQuery);
void Lazy(bool isLazy);
void Generated(PropertyGeneration generation);
}
public static class PropertyMapperExtensions
{
// 6.0 TODO: Move to IPropertyMapper
public static void FetchGroup(this IPropertyMapper mapper, string name)
{
if (mapper is PropertyMapper property)
{
property.FetchGroup(name);
}
}
}
}