C# Класс FluentNHibernate.Mapping.IdentityGenerationStrategyBuilder

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Assigned ( ) : IIdentityPart

lets the application to assign an identifier to the object before Save() is called.

Foreign ( string property ) : IIdentityPart

uses the identifier of another associated object. Usually used in conjunction with a one-to-one primary key association.

Guid ( ) : IIdentityPart

uses a new System.Guid as the identifier.

GuidComb ( ) : IIdentityPart

Recommended for Guid identifiers! uses the algorithm to generate a new System.Guid described by Jimmy Nilsson in the article http://www.informit.com/articles/article.asp?p=25862.

HiLo ( string maxLo ) : IIdentityPart

uses a hi/lo algorithm to efficiently generate identifiers of any integral type, given a table and column (by default hibernate_unique_key and next_hi respectively) as a source of hi values. The hi/lo algorithm generates identifiers that are unique only for a particular database. Do not use this generator with a user-supplied connection. requires a "special" database table to hold the next available "hi" value

HiLo ( string table, string column, string maxLo ) : IIdentityPart

uses a hi/lo algorithm to efficiently generate identifiers of any integral type, given a table and column (by default hibernate_unique_key and next_hi respectively) as a source of hi values. The hi/lo algorithm generates identifiers that are unique only for a particular database. Do not use this generator with a user-supplied connection. requires a "special" database table to hold the next available "hi" value

Identity ( ) : IIdentityPart

supports identity columns in DB2, MySQL, MS SQL Server and Sybase. The identifier returned by the database is converted to the property type using Convert.ChangeType. Any integral property type is thus supported.

IdentityGenerationStrategyBuilder ( IIdentityPart parent ) : System
Increment ( ) : IIdentityPart

generates identifiers of any integral type that are unique only when no other process is inserting data into the same table. Do not use in a cluster.

Native ( ) : IIdentityPart

picks identity, sequence or hilo depending upon the capabilities of the underlying database.

SeqHiLo ( string sequence, string maxLo ) : IIdentityPart

uses an Oracle-style sequence (where supported)

Sequence ( string sequenceName ) : IIdentityPart

uses a sequence in DB2, PostgreSQL, Oracle or a generator in Firebird. The identifier returned by the database is converted to the property type using Convert.ChangeType. Any integral property type is thus supported.

UuidHex ( string format ) : IIdentityPart

uses System.Guid and its ToString(string format) method to generate identifiers of type string. The length of the string returned depends on the configured format.

UuidString ( ) : IIdentityPart

uses a new System.Guid to create a byte[] that is converted to a string.

Приватные методы

Метод Описание
AddGeneratorParam ( string name, string innerXml ) : void
EnsureGuidIdentityType ( ) : void
EnsureIntegralIdenityType ( ) : void
EnsureStringIdentityType ( ) : void
IsIntegralType ( Type t ) : bool
SetGenerator ( string generator ) : void

Описание методов

Assigned() публичный Метод

lets the application to assign an identifier to the object before Save() is called.
public Assigned ( ) : IIdentityPart
Результат IIdentityPart

Foreign() публичный Метод

uses the identifier of another associated object. Usually used in conjunction with a one-to-one primary key association.
public Foreign ( string property ) : IIdentityPart
property string
Результат IIdentityPart

Guid() публичный Метод

uses a new System.Guid as the identifier.
public Guid ( ) : IIdentityPart
Результат IIdentityPart

GuidComb() публичный Метод

Recommended for Guid identifiers! uses the algorithm to generate a new System.Guid described by Jimmy Nilsson in the article http://www.informit.com/articles/article.asp?p=25862.
public GuidComb ( ) : IIdentityPart
Результат IIdentityPart

HiLo() публичный Метод

uses a hi/lo algorithm to efficiently generate identifiers of any integral type, given a table and column (by default hibernate_unique_key and next_hi respectively) as a source of hi values. The hi/lo algorithm generates identifiers that are unique only for a particular database. Do not use this generator with a user-supplied connection. requires a "special" database table to hold the next available "hi" value
public HiLo ( string maxLo ) : IIdentityPart
maxLo string
Результат IIdentityPart

HiLo() публичный Метод

uses a hi/lo algorithm to efficiently generate identifiers of any integral type, given a table and column (by default hibernate_unique_key and next_hi respectively) as a source of hi values. The hi/lo algorithm generates identifiers that are unique only for a particular database. Do not use this generator with a user-supplied connection. requires a "special" database table to hold the next available "hi" value
public HiLo ( string table, string column, string maxLo ) : IIdentityPart
table string
column string
maxLo string
Результат IIdentityPart

Identity() публичный Метод

supports identity columns in DB2, MySQL, MS SQL Server and Sybase. The identifier returned by the database is converted to the property type using Convert.ChangeType. Any integral property type is thus supported.
public Identity ( ) : IIdentityPart
Результат IIdentityPart

IdentityGenerationStrategyBuilder() публичный Метод

public IdentityGenerationStrategyBuilder ( IIdentityPart parent ) : System
parent IIdentityPart
Результат System

Increment() публичный Метод

generates identifiers of any integral type that are unique only when no other process is inserting data into the same table. Do not use in a cluster.
public Increment ( ) : IIdentityPart
Результат IIdentityPart

Native() публичный Метод

picks identity, sequence or hilo depending upon the capabilities of the underlying database.
public Native ( ) : IIdentityPart
Результат IIdentityPart

SeqHiLo() публичный Метод

uses an Oracle-style sequence (where supported)
public SeqHiLo ( string sequence, string maxLo ) : IIdentityPart
sequence string
maxLo string
Результат IIdentityPart

Sequence() публичный Метод

uses a sequence in DB2, PostgreSQL, Oracle or a generator in Firebird. The identifier returned by the database is converted to the property type using Convert.ChangeType. Any integral property type is thus supported.
public Sequence ( string sequenceName ) : IIdentityPart
sequenceName string
Результат IIdentityPart

UuidHex() публичный Метод

uses System.Guid and its ToString(string format) method to generate identifiers of type string. The length of the string returned depends on the configured format.
public UuidHex ( string format ) : IIdentityPart
format string http://msdn.microsoft.com/en-us/library/97af8hh4.aspx
Результат IIdentityPart

UuidString() публичный Метод

uses a new System.Guid to create a byte[] that is converted to a string.
public UuidString ( ) : IIdentityPart
Результат IIdentityPart