Class CamelCaseSplittingFieldNamingStrategy
java.lang.Object
org.springframework.data.mapping.model.CamelCaseSplittingFieldNamingStrategy
- All Implemented Interfaces:
FieldNamingStrategy
- Direct Known Subclasses:
CamelCaseAbbreviatingFieldNamingStrategy
,SnakeCaseFieldNamingStrategy
Configurable
FieldNamingStrategy
that splits up camel-case property names and reconcatenates them using a
configured delimiter. Individual parts of the name can be manipulated using preparePart(String)
.- Since:
- 1.9
- Author:
- Oliver Gierke
-
Constructor Summary
ConstructorDescriptionCamelCaseSplittingFieldNamingStrategy
(String delimiter) Creates a newCamelCaseSplittingFieldNamingStrategy
. -
Method Summary
Modifier and TypeMethodDescriptiongetFieldName
(PersistentProperty<?> property) Returns the field name to be used for the givenPersistentProperty
.protected String
preparePart
(String part) Callback to prepare the uncapitalized part obtained from the split up of the camel case source.
-
Constructor Details
-
CamelCaseSplittingFieldNamingStrategy
Creates a newCamelCaseSplittingFieldNamingStrategy
.- Parameters:
delimiter
- must not be null.
-
-
Method Details
-
getFieldName
Description copied from interface:FieldNamingStrategy
Returns the field name to be used for the givenPersistentProperty
.- Specified by:
getFieldName
in interfaceFieldNamingStrategy
- Parameters:
property
- must not be null or empty;- Returns:
-
preparePart
Callback to prepare the uncapitalized part obtained from the split up of the camel case source. Default implementation returns the part as is.- Parameters:
part
-- Returns:
-