@FunctionalInterface
@Introspected
public interface NamingStrategy
| Modifier and Type | Field and Description |
|---|---|
static NamingStrategy |
DEFAULT
Constant for the default under score separated lower case strategy.
|
| Modifier and Type | Method and Description |
|---|---|
default java.lang.String |
getForeignKeySuffix()
The default foreign key suffix for property names.
|
default java.lang.String |
mappedName(Embedded embedded,
PersistentProperty property)
Return the mapped name given an
Embedded association and the property of the assocation. |
default java.lang.String |
mappedName(PersistentEntity entity)
Return the mapped name for the given entity.
|
default java.lang.String |
mappedName(PersistentProperty property)
Return the mapped name for the given property.
|
java.lang.String |
mappedName(java.lang.String name)
Return the mapped name for the given name.
|
static final NamingStrategy DEFAULT
@NonNull
java.lang.String mappedName(@NonNull
java.lang.String name)
name - The name@NonNull
default java.lang.String mappedName(@NonNull
PersistentEntity entity)
entity - The entity@NonNull default java.lang.String mappedName(Embedded embedded, PersistentProperty property)
Embedded association and the property of the assocation. The
default strategy takes the parent embedded property name and combines it underscore separated with the child parent property name.
For example given:
@Embedded Address address;
Where the Address type has a property called street then a name of address_street will be returned
embedded - The embedded parentproperty - The embedded property@NonNull
default java.lang.String mappedName(@NonNull
PersistentProperty property)
property - The property@NonNull default java.lang.String getForeignKeySuffix()