Package dev.morphia.mapping
Class NamingStrategy
java.lang.Object
dev.morphia.mapping.NamingStrategy
Defines a naming strategy for use, e.g., in naming collections and fields
- Since:
- 2.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract String
Applies this naming strategy to the given valuestatic NamingStrategy
Defines a naming strategy that returns camel case of the value passedstatic NamingStrategy
identity()
Defines a naming strategy that returns the value passedstatic NamingStrategy
Defines a naming strategy that returns kebab case of the value passedstatic NamingStrategy
Defines a naming strategy that returns the lowercase form of the value passedstatic NamingStrategy
Defines a naming strategy that returns snake case of the value passed
-
Constructor Details
-
NamingStrategy
public NamingStrategy()
-
-
Method Details
-
identity
Defines a naming strategy that returns the value passed- Returns:
- the unchanged value.
-
lowerCase
Defines a naming strategy that returns the lowercase form of the value passed- Returns:
- the updated value.
-
snakeCase
Defines a naming strategy that returns snake case of the value passed- Returns:
- the new value.
- See Also:
-
camelCase
Defines a naming strategy that returns camel case of the value passed- Returns:
- the new value.
- See Also:
-
kebabCase
Defines a naming strategy that returns kebab case of the value passed- Returns:
- the new value.
- See Also:
-
apply
Applies this naming strategy to the given value- Parameters:
value
- the value to process- Returns:
- the updated value
-