Package org.hibernate.id
Class IncrementGenerator
java.lang.Object
org.hibernate.id.IncrementGenerator
- All Implemented Interfaces:
Configurable,IdentifierGenerator
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.)
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.)
-
Field Summary
Fields inherited from interface org.hibernate.id.IdentifierGenerator
ENTITY_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(Type type, Properties params, Dialect dialect) Configure this instance, given the value of parameters specified by the user as <param> elements.generate(SessionImplementor session, Object object) Generate a new identifier.
-
Constructor Details
-
IncrementGenerator
public IncrementGenerator()
-
-
Method Details
-
generate
Description copied from interface:IdentifierGeneratorGenerate a new identifier.- Specified by:
generatein interfaceIdentifierGenerator- Parameters:
session-object- the entity or toplevel collection for which the id is being generated- Returns:
- a new identifier
- Throws:
HibernateException
-
configure
Description copied from interface:ConfigurableConfigure this instance, given the value of parameters specified by the user as <param> elements. This method is called just once, following instantiation.- Specified by:
configurein interfaceConfigurable- Parameters:
params- param values, keyed by parameter name- Throws:
MappingException
-