Class ULIDGenerationStrategy
- java.lang.Object
-
- com.broadleafcommerce.auth.repository.provider.hibernate.generation.ULIDGenerationStrategy
-
- All Implemented Interfaces:
org.hibernate.id.Configurable
,org.hibernate.id.IdentifierGenerator
public class ULIDGenerationStrategy extends Object implements org.hibernate.id.IdentifierGenerator, org.hibernate.id.Configurable
A generation strategy that generates a ULID for a primary key. This assumes that the property the ULID is generated for is a String. For more information about the advantages of ULIDs over UUIDs for primary keys see the docs.- Author:
- Phillip Verheyden (phillipuniverse)
-
-
Constructor Summary
Constructors Constructor Description ULIDGenerationStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(org.hibernate.type.Type type, Properties params, org.hibernate.service.ServiceRegistry serviceRegistry)
Serializable
generate(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object object)
-
-
-
Method Detail
-
configure
public void configure(org.hibernate.type.Type type, Properties params, org.hibernate.service.ServiceRegistry serviceRegistry) throws org.hibernate.MappingException
- Specified by:
configure
in interfaceorg.hibernate.id.Configurable
- Throws:
org.hibernate.MappingException
-
generate
public Serializable generate(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object object) throws org.hibernate.HibernateException
- Specified by:
generate
in interfaceorg.hibernate.id.IdentifierGenerator
- Throws:
org.hibernate.HibernateException
-
-