Package org.hibernate.id.enhanced
Class StandardNamingStrategy
java.lang.Object
org.hibernate.id.enhanced.StandardNamingStrategy
- All Implemented Interfaces:
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
FieldsFields inherited from interface org.hibernate.id.enhanced.ImplicitDatabaseObjectNamingStrategy
DEF_SEQUENCE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondetermineSequenceName
(Identifier catalogName, Identifier schemaName, Map<?, ?> configValues, ServiceRegistry serviceRegistry) Determine the implicit name for an identifier-generator sequencedetermineTableName
(Identifier catalogName, Identifier schemaName, Map<?, ?> configValues, ServiceRegistry serviceRegistry) Determine the implicit name for an identifier-generator table
-
Field Details
-
STRATEGY_NAME
- See Also:
-
-
Constructor Details
-
StandardNamingStrategy
public StandardNamingStrategy()
-
-
Method Details
-
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:
-
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:
-