Interface IdentifierGenerator

    • Method Detail

      • configure

        default void configure​(Type type,
                               java.util.Properties params,
                               ServiceRegistry serviceRegistry)
                        throws MappingException
        Configure this instance, given the value of parameters specified by the user as <param> elements.

        This method is called just once, following instantiation, and before registerExportables(Database).

        Specified by:
        configure in interface Configurable
        type - The id property type descriptor
        params - param values, keyed by parameter name
        serviceRegistry - Access to service that may be needed.
        MappingException - If configuration fails.
      • initialize

        default void initialize​(SqlStringGenerationContext context)
        Initializes this instance, in particular pre-generates SQL as necessary.

        This method is called after registerExportables(Database), before first use.

        context - A context to help generate SQL strings
      • generate generate​(SharedSessionContractImplementor session,
                                      java.lang.Object object)
                               throws HibernateException
        Generate a new identifier.
        session - The session from which the request originates
        object - the entity or collection (idbag) for which the id is being generated
        a new identifier
        HibernateException - Indicates trouble generating the identifier
      • supportsJdbcBatchInserts

        default boolean supportsJdbcBatchInserts()
        Check if JDBC batch inserts are supported.
        JDBC batch inserts are supported.