Class MyBatis3FormattingUtilities
java.lang.Object
org.mybatis.generator.codegen.mybatis3.MyBatis3FormattingUtilities
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getAliasedActualColumnName
(IntrospectedColumn introspectedColumn) The aliased column name for a select statement generated by the example clauses.static String
getAliasedEscapedColumnName
(IntrospectedColumn introspectedColumn) static String
getEscapedColumnName
(IntrospectedColumn introspectedColumn) static String
getParameterClause
(IntrospectedColumn introspectedColumn) static String
getParameterClause
(IntrospectedColumn introspectedColumn, String prefix) static String
getRenamedColumnNameForResultMap
(IntrospectedColumn introspectedColumn) The renamed column name for a select statement.static String
getSelectListPhrase
(IntrospectedColumn introspectedColumn) The phrase to use in a select list.
-
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
-