Module spring.data.relational
Class DefaultNamingStrategy
java.lang.Object
org.springframework.data.relational.core.mapping.DefaultNamingStrategy
- All Implemented Interfaces:
NamingStrategy
The default naming strategy used by Spring Data Relational. Names are in
SNAKE_CASE.- Since:
- 3.0
- Author:
- Jens Schauder
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetReverseColumnName(RelationalPersistentEntity<?> parent) For a reference A -> B this is the name in the table for B which references A.voidsetForeignKeyNaming(ForeignKeyNaming foreignKeyNaming) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.data.relational.core.mapping.NamingStrategy
getColumnName, getKeyColumn, getSchema, getTableName
-
Field Details
-
INSTANCE
Static immutable instance of the class. It is made immutable by lettingsetForeignKeyNaming(ForeignKeyNaming)throw an exception.Using this avoids creating essentially the same class over and over again.
-
-
Constructor Details
-
DefaultNamingStrategy
public DefaultNamingStrategy()
-
-
Method Details
-
setForeignKeyNaming
-
getReverseColumnName
Description copied from interface:NamingStrategyFor a reference A -> B this is the name in the table for B which references A.- Specified by:
getReverseColumnNamein interfaceNamingStrategy- Parameters:
property- The property whose column name in the owner table is required- Returns:
- a column name. Must not be
null.
-
getReverseColumnName
- Specified by:
getReverseColumnNamein interfaceNamingStrategy
-
getReverseColumnName
- Specified by:
getReverseColumnNamein interfaceNamingStrategy
-