Package com.fayupable.snowflake.jpa
Class SnowflakeIdentifierGenerator
java.lang.Object
com.fayupable.snowflake.jpa.SnowflakeIdentifierGenerator
- All Implemented Interfaces:
Serializable,org.hibernate.boot.model.relational.ExportableProducer,org.hibernate.generator.BeforeExecutionGenerator,org.hibernate.generator.Generator,org.hibernate.id.Configurable,org.hibernate.id.IdentifierGenerator
public class SnowflakeIdentifierGenerator
extends Object
implements org.hibernate.id.IdentifierGenerator
Hibernate
IdentifierGenerator that delegates id generation to whatever
IdGenerator is registered in
SnowflakeIdGeneratorHolder.
Consumers never instantiate this class directly. Hibernate creates it via
reflection when it encounters a field or property annotated with
SnowflakeGeneratedId. Because Hibernate, not Spring, owns the lifecycle
of this object, constructor and field injection are not available here; the
static holder lookup in generate(org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object) is the only way to reach the
actual, DI-configured generator.
- See Also:
-
Field Summary
Fields inherited from interface org.hibernate.id.IdentifierGenerator
CONTRIBUTOR_NAME, ENTITY_NAME, GENERATOR_NAME, JPA_ENTITY_NAME -
Constructor Summary
Constructors -
Method Summary
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
configure, initializeMethods inherited from interface org.hibernate.generator.Generator
allowAssignedIdentifiers, allowMutation, generatedBeforeExecution, generatedOnExecution, generatesOnForceIncrement, generatesOnInsert, generatesOnUpdate, generatesSometimesMethods inherited from interface org.hibernate.id.IdentifierGenerator
configure, generate, getEventTypes, registerExportables
-
Constructor Details
-
SnowflakeIdentifierGenerator
public SnowflakeIdentifierGenerator()
-
-
Method Details