Class MyBatis3FormattingUtilities
java.lang.Object
org.mybatis.generator.codegen.mybatis3.MyBatis3FormattingUtilities
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetAliasedActualColumnName(IntrospectedColumn introspectedColumn) The aliased column name for a select statement generated by the example clauses.static StringgetAliasedEscapedColumnName(IntrospectedColumn introspectedColumn) static StringgetEscapedColumnName(IntrospectedColumn introspectedColumn) static StringgetParameterClause(IntrospectedColumn introspectedColumn) static StringgetParameterClause(IntrospectedColumn introspectedColumn, String prefix) static StringgetRenamedColumnNameForResultMap(IntrospectedColumn introspectedColumn) The renamed column name for a select statement.static StringgetSelectListPhrase(IntrospectedColumn introspectedColumn) The phrase to use in a select list.
-
Constructor Details
-
MyBatis3FormattingUtilities
private MyBatis3FormattingUtilities()
-
-
Method Details
-
getParameterClause
-
getParameterClause
-
getSelectListPhrase
The phrase to use in a select list. If there is a table alias, the value will be "alias.columnName as alias_columnName"- Parameters:
introspectedColumn- the introspected column- Returns:
- the proper phrase
-
getEscapedColumnName
-
getAliasedEscapedColumnName
-
getAliasedActualColumnName
The aliased column name for a select statement generated by the example clauses. This is not appropriate for selects in SqlMaps because the column is not escaped for MyBatis. If there is a table alias, the value will be alias.columnName.This method is used in the Example classes and the returned value will be in a Java string. So we need to escape double quotes if they are the delimiters.
- Parameters:
introspectedColumn- the introspected column- Returns:
- the aliased column name
-
getRenamedColumnNameForResultMap
The renamed column name for a select statement. If there is a table alias, the value will be alias_columnName. This is appropriate for use in a result map.- Parameters:
introspectedColumn- the introspected column- Returns:
- the renamed column name
-