Interface ColumnNameMatcher
- All Known Implementing Classes:
AbstractSeparatorCharColumnNameMatcher
,CaseInsensitiveColumnNameMatcher
,SnakeCaseColumnNameMatcher
public interface ColumnNameMatcher
Strategy for matching SQL column names to Java property, field, or parameter names.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
columnNameMatches
(String columnName, String javaName) Returns whether the column name fits the given Java identifier name.default boolean
columnNameStartsWith
(String columnName, String prefix) Return whether the column name starts with the given prefix, according to the matching strategy of thisColumnNameMatcher
.
-
Method Details
-
columnNameMatches
-
columnNameStartsWith
Return whether the column name starts with the given prefix, according to the matching strategy of thisColumnNameMatcher
. This method is used by reflective mappers to short-circuit nested mapping when no column names begin with the nested prefix. By default, this method returnscolumnName.startWith(prefix)
. Third party implementations should override this method to match prefixes by the same criteria ascolumnNameMatches(String, String)
.- Parameters:
columnName
- the column name to testprefix
- the prefix to test for- Returns:
- whether the column name begins with the prefix.
- Since:
- 3.5.0
-