C# Class FluentNHibernate.Mapping.IdentityGenerationStrategyBuilder

Afficher le fichier Open project: HudsonAkridge/fluent-nhibernate Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
AddGeneratorParam ( string name, string innerXml ) : void
EnsureGuidIdentityType ( ) : void
EnsureIntegralIdenityType ( ) : void
EnsureStringIdentityType ( ) : void
IsIntegralType ( Type t ) : bool
SetGenerator ( string generator ) : void

Method Details

Assigned() public méthode

lets the application to assign an identifier to the object before Save() is called.
public Assigned ( ) : IIdentityPart
Résultat IIdentityPart

Foreign() public méthode

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
Résultat IIdentityPart

Guid() public méthode

uses a new System.Guid as the identifier.
public Guid ( ) : IIdentityPart
Résultat IIdentityPart

GuidComb() public méthode

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
Résultat IIdentityPart

HiLo() public méthode

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
Résultat IIdentityPart

HiLo() public méthode

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
Résultat IIdentityPart

Identity() public méthode

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
Résultat IIdentityPart

IdentityGenerationStrategyBuilder() public méthode

public IdentityGenerationStrategyBuilder ( IIdentityPart parent ) : System
parent IIdentityPart
Résultat System

Increment() public méthode

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
Résultat IIdentityPart

Native() public méthode

picks identity, sequence or hilo depending upon the capabilities of the underlying database.
public Native ( ) : IIdentityPart
Résultat IIdentityPart

SeqHiLo() public méthode

uses an Oracle-style sequence (where supported)
public SeqHiLo ( string sequence, string maxLo ) : IIdentityPart
sequence string
maxLo string
Résultat IIdentityPart

Sequence() public méthode

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
Résultat IIdentityPart

UuidHex() public méthode

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
Résultat IIdentityPart

UuidString() public méthode

uses a new System.Guid to create a byte[] that is converted to a string.
public UuidString ( ) : IIdentityPart
Résultat IIdentityPart