Class IncrementGenerator

java.lang.Object
org.hibernate.id.IncrementGenerator
All Implemented Interfaces:
Serializable, ExportableProducer, BeforeExecutionGenerator, Generator, Configurable, IdentifierGenerator

public class IncrementGenerator extends Object implements IdentifierGenerator
An IdentifierGenerator that returns a long, constructed by counting from the maximum primary key value obtained by querying the table or tables at startup.

This id generator is not safe unless a single VM has exclusive access to the database.

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

See Also:
Implementation Note:
This also implements the increment generation type in hbm.xml mappings.