Class EntityIdGenerator

  • 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 EntityIdGenerator
    extends Object
    implements org.hibernate.id.IdentifierGenerator
    Entity identifier generator.
    Since:
    1.0.0
    Author:
    imre.scheffer
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from interface org.hibernate.id.IdentifierGenerator

        CONTRIBUTOR_NAME, ENTITY_NAME, GENERATOR_NAME, JPA_ENTITY_NAME
    • Constructor Summary

      Constructors 
      Constructor Description
      EntityIdGenerator()
      Default constructor, constructs a new object.
    • Constructor Detail

      • EntityIdGenerator

        public EntityIdGenerator()
        Default constructor, constructs a new object.
    • Method Detail

      • 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
      • generateId

        public static String generateId()
        generate fix 16 length id!
        Returns:
        entityId