public interface DbNamingStrategy
Interface to define the naming strategy to map
EntityBeans to a database.- Since:
- 1.0.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringgetColumnName(io.github.mmm.property.ReadableProperty<?> property) default StringgetColumnName(io.github.mmm.value.PropertyPath<?> property, io.github.mmm.value.converter.TypeMapper<?, ?> typeMapper) default StringgetColumnName(String rawColumnName) default StringgetColumnName(String rawColumnName, io.github.mmm.value.converter.TypeMapper<?, ?> typeMapper) default StringgetTableName(EntityBean bean) default StringgetTableName(AbstractEntityClause<?, ?, ?> entityClause) default StringgetTableName(String rawTableName) static DbNamingStrategyof()static DbNamingStrategyof(io.github.mmm.base.text.CaseSyntax caseSyntax) static DbNamingStrategyofRdbms()
-
Method Details
-
getColumnName
- Parameters:
property- theReadablePropertyto derive the column name from.- Returns:
- the column name for the given
property.
-
getColumnName
default String getColumnName(io.github.mmm.value.PropertyPath<?> property, io.github.mmm.value.converter.TypeMapper<?, ?> typeMapper) - Parameters:
property- thePropertyPathto derive the column name from.typeMapper- the explicitTypeMapper.- Returns:
- the column name for the given
property.
-
getColumnName
default String getColumnName(String rawColumnName, io.github.mmm.value.converter.TypeMapper<?, ?> typeMapper) - Parameters:
rawColumnName- the raw column name to map.typeMapper- the explicitTypeMapper.- Returns:
- the column name for the given
property.
-
getColumnName
- Parameters:
rawColumnName- the raw column name to map. E.g.property name.- Returns:
- the final column name.
-
getTableName
- Parameters:
bean- theEntityBeanto map to a database table.- Returns:
- the physical table name.
-
getTableName
- Parameters:
entityClause- theAbstractEntityClause.- Returns:
- the physical table name.
-
getTableName
- Parameters:
rawTableName- the raw table name to map. May be thestable entity name.- Returns:
- the database table name.
-
of
- Returns:
- the default
DbNamingStrategy.
-
of
- Parameters:
caseSyntax- theCaseSyntaxto use.- Returns:
- the
DbNamingStrategyconverting to the givenCaseSyntax.
-
ofRdbms
- Returns:
- the
DbNamingStrategyfor legacy RDBMS.
-