Package org.hibernate.id.uuid
Class UuidGenerator
- java.lang.Object
-
- org.hibernate.id.uuid.UuidGenerator
-
- All Implemented Interfaces:
ExportableProducer
,Configurable
,StandardGenerator
,IdentifierGenerator
public class UuidGenerator extends Object implements StandardGenerator
UUID-based IdentifierGenerator- See Also:
UuidGenerator
-
-
Field Summary
-
Fields inherited from interface org.hibernate.id.IdentifierGenerator
CONTRIBUTOR_NAME, ENTITY_NAME, GENERATOR_NAME, JPA_ENTITY_NAME
-
-
Constructor Summary
Constructors Constructor Description UuidGenerator(UuidGenerator config, Member idMember, CustomIdGeneratorCreationContext creationContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
generate(SharedSessionContractImplementor session, Object object)
Generate a new identifier.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.id.IdentifierGenerator
configure, initialize, registerExportables, supportsJdbcBatchInserts
-
-
-
-
Constructor Detail
-
UuidGenerator
public UuidGenerator(UuidGenerator config, Member idMember, CustomIdGeneratorCreationContext creationContext)
-
-
Method Detail
-
generate
public Object generate(SharedSessionContractImplementor session, Object object) throws HibernateException
Description copied from interface:IdentifierGenerator
Generate a new identifier.- Specified by:
generate
in interfaceIdentifierGenerator
- Parameters:
session
- The session from which the request originatesobject
- the entity or collection (idbag) for which the id is being generated- Returns:
- a new identifier
- Throws:
HibernateException
- Indicates trouble generating the identifier
-
-