public interface NamingStrategy
Class
and column name based on RelationalPersistentProperty with name parts of both separated by '_'.
NOTE: Can also be used as an adapter. Create a lambda or an anonymous subclass and override any settings to implement a different strategy on the fly.
| Modifier and Type | Field and Description |
|---|---|
static NamingStrategy |
INSTANCE
Empty implementation of the interface utilizing only the default implementation.
|
| Modifier and Type | Method and Description |
|---|---|
default String |
getColumnName(RelationalPersistentProperty property)
Defaults to return the given
RelationalPersistentProperty's name with the parts of a camel case name
separated by '_'; |
default String |
getKeyColumn(RelationalPersistentProperty property)
For a map valued reference A -> Map>X,B< this is the name of the column in the table for B holding the key of
the map.
|
default String |
getQualifiedTableName(Class<?> type)
Deprecated.
since 2.0. The method returns a concatenated schema with table name which conflicts with escaping. Use
rather
getTableName(Class) and getSchema() independently |
default String |
getReverseColumnName(PersistentPropertyPathExtension path) |
default String |
getReverseColumnName(RelationalPersistentProperty property)
For a reference A -> B this is the name in the table for B which references A.
|
default String |
getSchema()
Defaults to no schema.
|
default String |
getTableName(Class<?> type)
The name of the table to be used for persisting entities having the type passed as an argument.
|
static final NamingStrategy INSTANCE
Using this avoids creating essentially the same class over and over again.
default String getSchema()
default String getTableName(Class<?> type)
type.getSimpleName() and separates camel case parts with '_'.default String getColumnName(RelationalPersistentProperty property)
RelationalPersistentProperty's name with the parts of a camel case name
separated by '_';@Deprecated default String getQualifiedTableName(Class<?> type)
getTableName(Class) and getSchema() independentlytype - default String getReverseColumnName(RelationalPersistentProperty property)
property - The property who's column name in the owner table is requirednull.default String getReverseColumnName(PersistentPropertyPathExtension path)
default String getKeyColumn(RelationalPersistentProperty property)
null.Copyright © 2017–2021 Pivotal Software, Inc.. All rights reserved.