Top Description Fields Constructors Methods
org.hibernate.id.enhanced

public Class LegacyNamingStrategy

extends Object
implements ImplicitDatabaseObjectNamingStrategy
Class Inheritance
All Implemented Interfaces
org.hibernate.id.enhanced.ImplicitDatabaseObjectNamingStrategy
Imports
java.util.Map, jakarta.persistence.GeneratedValue, org.hibernate.boot.model.naming.Identifier, org.hibernate.boot.model.relational.QualifiedName, .QualifiedNameParser, .QualifiedSequenceName, org.hibernate.engine.jdbc.env.spi.JdbcEnvironment, org.hibernate.service.ServiceRegistry

Naming strategy which implements the behavior of older versions of Hibernate, for the most part.

For sequences (including forced-table sequences):

  1. If sequence_per_entity_suffix is specified, a name composed of the "base" name with the specified suffix. The base name depends on the usage of the generator, but is generally the root entity-name if applied to an entity identifier or the table we are generating values for.
  2. If annotations are used and GeneratedValue#generator() is specified, its value is used as the sequence name.
  3. Fall back is to use hibernate_sequence.
For tables:
  1. If annotations are used and GeneratedValue#generator() is specified, its value is used as the table name.
  2. Fall back is to use hibernate_sequences.

Field Summary

Modifier and TypeField and Description
public static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public QualifiedName
determineSequenceName(Identifier catalogName, Identifier schemaName, Map<?, ?> configValues, ServiceRegistry serviceRegistry)

Implements org.hibernate.id.enhanced.ImplicitDatabaseObjectNamingStrategy.determineSequenceName.

Determine the implicit name for an identifier-generator sequence
public QualifiedName
determineTableName(Identifier catalogName, Identifier schemaName, Map<?, ?> configValues, ServiceRegistry serviceRegistry)

Implements org.hibernate.id.enhanced.ImplicitDatabaseObjectNamingStrategy.determineTableName.

Determine the implicit name for an identifier-generator table
private String
implicitSequenceName(Map<?, ?> configValues)

private String
implicitTableName(Map<?, ?> configValues)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

STRATEGY_NAMEback to summary
public static final String STRATEGY_NAME

Constructor Detail

LegacyNamingStrategyback to summary
public LegacyNamingStrategy()

Method Detail

determineSequenceNameback to summary
public QualifiedName determineSequenceName(Identifier catalogName, Identifier schemaName, Map<?, ?> configValues, ServiceRegistry serviceRegistry)

Implements org.hibernate.id.enhanced.ImplicitDatabaseObjectNamingStrategy.determineSequenceName.

Doc from org.hibernate.id.enhanced.ImplicitDatabaseObjectNamingStrategy.determineSequenceName.

Determine the implicit name for an identifier-generator sequence

determineTableNameback to summary
public QualifiedName determineTableName(Identifier catalogName, Identifier schemaName, Map<?, ?> configValues, ServiceRegistry serviceRegistry)

Implements org.hibernate.id.enhanced.ImplicitDatabaseObjectNamingStrategy.determineTableName.

Doc from org.hibernate.id.enhanced.ImplicitDatabaseObjectNamingStrategy.determineTableName.

Determine the implicit name for an identifier-generator table

Annotations
@Override
implicitSequenceNameback to summary
private String implicitSequenceName(Map<?, ?> configValues)
implicitTableNameback to summary
private String implicitTableName(Map<?, ?> configValues)