Package org.hibernate.id
Class Assigned
java.lang.Object
org.hibernate.id.Assigned
- All Implemented Interfaces:
Serializable,ExportableProducer,BeforeExecutionGenerator,Generator,Configurable,StandardGenerator,IdentifierGenerator
An
IdentifierGenerator that returns the current identifier assigned
to an instance.- See Also:
- Implementation Note:
- This also implements the
assignedgeneration type inhbm.xmlmappings.
-
Field Summary
Fields inherited from interface org.hibernate.id.IdentifierGenerator
CONTRIBUTOR_NAME, ENTITY_NAME, GENERATOR_NAME, JPA_ENTITY_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(Type type, Properties parameters, ServiceRegistry serviceRegistry) Configure this instance, given the value of parameters specified by the user as<param>elements.generate(SharedSessionContractImplementor session, Object obj) Generate a new identifier.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.generator.BeforeExecutionGenerator
generatedOnExecutionMethods inherited from interface org.hibernate.id.Configurable
initializeMethods inherited from interface org.hibernate.generator.Generator
allowAssignedIdentifiers, generatedOnExecution, generatesOnInsert, generatesOnUpdate, generatesSometimesMethods inherited from interface org.hibernate.id.IdentifierGenerator
generate, getEventTypes, registerExportables, supportsJdbcBatchInserts
-
Constructor Details
-
Assigned
public Assigned()
-
-
Method Details
-
configure
public void configure(Type type, Properties parameters, ServiceRegistry serviceRegistry) throws MappingException Description copied from interface:IdentifierGeneratorConfigure this instance, given the value of parameters specified by the user as<param>elements.This method is called just once, following instantiation, and before
IdentifierGenerator.registerExportables(Database).- Specified by:
configurein interfaceConfigurable- Specified by:
configurein interfaceIdentifierGenerator- Parameters:
type- The id property type descriptorparameters- param values, keyed by parameter nameserviceRegistry- Access to service that may be needed.- Throws:
MappingException- If configuration fails.