Top Description Fields Constructors Methods
org.hibernate.id

public Class GUIDGenerator

extends Object
implements IdentifierGenerator
Class Inheritance
All Implemented Interfaces
org.hibernate.id.IdentifierGenerator, org.hibernate.boot.model.relational.ExportableProducer, org.hibernate.id.Configurable
Imports
java.io.Serializable, java.sql.PreparedStatement, .ResultSet, .SQLException, org.hibernate.HibernateException, org.hibernate.engine.spi.SharedSessionContractImplementor, org.hibernate.internal.CoreLogging, .CoreMessageLogger

Deprecated

as a consequence of IdentifierGenerator being deprecated. See corresponding docs for further information.

Generates string values using the SQL Server NEWID() function.
Author
Joseph Fifield

Field Summary

Modifier and TypeField and Description
private static final CoreMessageLogger
private static boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Serializable
generate(SharedSessionContractImplementor
The session from which the request originates
session
,
Object
the entity or collection (idbag) for which the id is being generated
obj
)

Implements org.hibernate.id.IdentifierGenerator.generate.

Generate a new identifier.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOGback to summary
private static final CoreMessageLogger LOG
WARNEDback to summary
private static boolean WARNED

Constructor Detail

GUIDGeneratorback to summary
public GUIDGenerator()

Method Detail

generateback to summary
public Serializable generate(SharedSessionContractImplementor session, Object obj) throws HibernateException

Implements org.hibernate.id.IdentifierGenerator.generate.

Doc from org.hibernate.id.IdentifierGenerator.generate.

Generate a new identifier.

Parameters
session:SharedSessionContractImplementor

The session from which the request originates

obj:Object

the entity or collection (idbag) for which the id is being generated

Returns:Serializable

a new identifier

Exceptions
HibernateException:
Indicates trouble generating the identifier