Package org.hibernate.id.enhanced
Class LegacyNamingStrategy
- java.lang.Object
-
- org.hibernate.id.enhanced.LegacyNamingStrategy
-
- All Implemented Interfaces:
ImplicitDatabaseObjectNamingStrategy
public class LegacyNamingStrategy extends Object implements ImplicitDatabaseObjectNamingStrategy
Naming strategy which implements the behavior of older versions of Hibernate, for the most part.For sequences (including forced-table sequences):
- 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.
-
If annotations are used and
GeneratedValue.generator()
is specified, its value is used as the sequence name. - Fall back is to use "hibernate_sequence".
-
If annotations are used and
GeneratedValue.generator()
is specified, its value is used as the table name. - Fall back is to use "hibernate_sequences".
-
-
Field Summary
Fields Modifier and Type Field Description static String
STRATEGY_NAME
-
Fields inherited from interface org.hibernate.id.enhanced.ImplicitDatabaseObjectNamingStrategy
DEF_SEQUENCE
-
-
Constructor Summary
Constructors Constructor Description LegacyNamingStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QualifiedName
determineSequenceName(Identifier catalogName, Identifier schemaName, Map<?,?> configValues, ServiceRegistry serviceRegistry)
Determine the implicit name for an identifier-generator sequenceQualifiedName
determineTableName(Identifier catalogName, Identifier schemaName, Map<?,?> configValues, ServiceRegistry serviceRegistry)
Determine the implicit name for an identifier-generator table
-
-
-
Field Detail
-
STRATEGY_NAME
public static final String STRATEGY_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
determineSequenceName
public QualifiedName determineSequenceName(Identifier catalogName, Identifier schemaName, Map<?,?> configValues, ServiceRegistry serviceRegistry)
Description copied from interface:ImplicitDatabaseObjectNamingStrategy
Determine the implicit name for an identifier-generator sequence- Specified by:
determineSequenceName
in interfaceImplicitDatabaseObjectNamingStrategy
- See Also:
SequenceStyleGenerator
,SequenceStructure
-
determineTableName
public QualifiedName determineTableName(Identifier catalogName, Identifier schemaName, Map<?,?> configValues, ServiceRegistry serviceRegistry)
Description copied from interface:ImplicitDatabaseObjectNamingStrategy
Determine the implicit name for an identifier-generator table- Specified by:
determineTableName
in interfaceImplicitDatabaseObjectNamingStrategy
- See Also:
TableGenerator
,TableStructure
-
-