Class IncrementGenerator

  • All Implemented Interfaces:
    Configurable, IdentifierGenerator

    public class IncrementGenerator
    extends java.lang.Object
    implements IdentifierGenerator, Configurable
    increment

    An IdentifierGenerator that returns a long, constructed by counting from the maximum primary key value at startup. Not safe for use in a cluster!

    Mapping parameters supported, but not usually needed: tables, column. (The tables parameter specified a comma-separated list of table names.)
    • Constructor Detail

      • IncrementGenerator

        public IncrementGenerator()
    • Method Detail

      • configure

        public void configure​(Type type,
                              java.util.Properties params,
                              ServiceRegistry serviceRegistry)
                       throws MappingException
        Description copied from interface: Configurable
        Configure this instance, given the value of parameters specified by the user as <param> elements. This method is called just once, following instantiation.
        Specified by:
        configure in interface Configurable
        Parameters:
        type - The id property type descriptor
        params - param values, keyed by parameter name
        serviceRegistry - Access to service that may be needed.
        Throws:
        MappingException