Package org.hibernate.id.enhanced
Class StandardNamingStrategy
- java.lang.Object
-
- org.hibernate.id.enhanced.StandardNamingStrategy
-
- All Implemented Interfaces:
ImplicitDatabaseObjectNamingStrategy
public class StandardNamingStrategy extends Object implements ImplicitDatabaseObjectNamingStrategy
The standard implicit naming strategy for identifier sequences and tables.For sequences (including forced-table sequences):
- If "sequence_per_entity_suffix" is specified, a name is composed of the "base" name with the specified suffix. The base name depends on the usage of the generator, but is usually the root entity name if applied to an entity identifier or the table we are generating values for, or
-
If annotations are used and
GeneratedValue.generator()
is specified, its value is used as the sequence name. - If the "base" name is known, use that.
-
Otherwise, throw a
MappingException
.
For tables:
-
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 StandardNamingStrategy()
-
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
-
-