Top Description Fields Constructors Methods
org.hibernate.id

public Class GUIDGenerator

extends Object
implements IdentifierGenerator
Class Inheritance
All Implemented Interfaces
org.hibernate.id.IdentifierGenerator
Imports
java.io.Serializable, java.sql.PreparedStatement, .ResultSet, .SQLException, org.slf4j.Logger, .LoggerFactory, org.hibernate.HibernateException, org.hibernate.engine.SessionImplementor, org.hibernate.exception.JDBCExceptionHelper

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

Field Summary

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

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Serializable
generate(SessionImplementor session, Object
the entity or toplevel collection 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 Logger log
warnedback to summary
private static boolean warned

Constructor Detail

GUIDGeneratorback to summary
public GUIDGenerator()

Method Detail

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

Implements org.hibernate.id.IdentifierGenerator.generate.

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

Generate a new identifier.

Parameters
obj:Object

the entity or toplevel collection for which the id is being generated

Returns:Serializable

a new identifier