An IIdentifierGenerator that returns a string of length 32, 36, or 38 depending on the configuration.

Namespace: NHibernate.Id
Assembly: NHibernate (in NHibernate.dll) Version: 3.2.0.4000 (3.2.0.4000)

Syntax

C#
public class UUIDHexGenerator : IIdentifierGenerator, 
	IConfigurable
Visual Basic
Public Class UUIDHexGenerator _
	Implements IIdentifierGenerator, IConfigurable
Visual C++
public ref class UUIDHexGenerator : IIdentifierGenerator, 
	IConfigurable

Remarks

This id generation strategy is specified in the mapping file as

CopyC#
<generator class="uuid.hex">
    <param name="format">format_string</param>
    <param name="seperator">seperator_string</param>
</generator>

The format and seperator parameters are optional.

The identifier string will consist of only hex digits. Optionally, the identifier string may be generated with enclosing characters and seperators between each component of the UUID. If there are seperators then the string length will be 36. If a format that has enclosing brackets is used, then the string length will be 38.

format is either "N" (xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx), "D" (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx), "B" ({xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}), or "P" ((xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)). These formats are described in the Guid.ToString(String) method. If no format is specified the default is "N".

seperator is the char that will replace the "-" if specified. If no value is configured then the default seperator for the format will be used. If the format "D", "B", or "P" is specified, then the seperator will replace the "-". If the format is "N" then this parameter will be ignored.

This class is based on Guid

Inheritance Hierarchy

System..::..Object
  NHibernate.Id..::..UUIDHexGenerator

See Also