Class StringIdGenerator

java.lang.Object
net.ideahut.springboot.generator.StringIdGenerator
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.factory.spi.StandardGenerator, org.hibernate.id.IdentifierGenerator

public class StringIdGenerator extends Object implements org.hibernate.id.IdentifierGenerator, org.hibernate.id.factory.spi.StandardGenerator
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     

    Fields inherited from interface org.hibernate.id.IdentifierGenerator

    CONTRIBUTOR_NAME, ENTITY_NAME, GENERATOR_NAME, JPA_ENTITY_NAME
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    configure(org.hibernate.type.Type type, Properties params, org.hibernate.service.ServiceRegistry serviceRegistry)
     
    static String
     
    static String
    createId(String prefix)
     
    generate(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object object)
     
    static String
     
    static void
    setPrefix(String prefix)
     
    static void
    setSuffixLength(int suffixLength)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.hibernate.generator.BeforeExecutionGenerator

    generatedOnExecution

    Methods inherited from interface org.hibernate.generator.Generator

    generatedOnExecution, generatesOnInsert, generatesOnUpdate, generatesSometimes

    Methods inherited from interface org.hibernate.id.IdentifierGenerator

    generate, getEventTypes, initialize, registerExportables, supportsJdbcBatchInserts
  • Field Details

  • Constructor Details

    • StringIdGenerator

      public StringIdGenerator()
  • Method Details

    • configure

      public void configure(org.hibernate.type.Type type, Properties params, org.hibernate.service.ServiceRegistry serviceRegistry) throws org.hibernate.MappingException
      Specified by:
      configure in interface org.hibernate.id.Configurable
      Specified by:
      configure in interface org.hibernate.id.IdentifierGenerator
      Throws:
      org.hibernate.MappingException
    • generate

      public Serializable generate(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object object) throws org.hibernate.HibernateException
      Specified by:
      generate in interface org.hibernate.id.IdentifierGenerator
      Throws:
      org.hibernate.HibernateException
    • setPrefix

      public static void setPrefix(String prefix)
    • getPrefix

      public static String getPrefix()
    • setSuffixLength

      public static void setSuffixLength(int suffixLength)
    • createId

      public static String createId(String prefix)
    • createId

      public static String createId()