Package org.mybatis.dynamic.sql
Class StringConstant
- java.lang.Object
-
- org.mybatis.dynamic.sql.StringConstant
-
- All Implemented Interfaces:
BasicColumn
,BindableColumn<String>
public class StringConstant extends Object implements BindableColumn<String>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<String>
alias()
Returns the columns alias if one has been specified.StringConstant
as(String alias)
Override the base method definition to make it more specific to this interface.static StringConstant
of(String value)
String
renderWithTableAlias(TableAliasCalculator tableAliasCalculator)
Returns the name of the item aliased with a table name if appropriate.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.mybatis.dynamic.sql.BasicColumn
renderWithTableAndColumnAlias
-
Methods inherited from interface org.mybatis.dynamic.sql.BindableColumn
convertParameterType, javaType, jdbcType, renderingStrategy, typeHandler
-
-
-
-
Method Detail
-
alias
public Optional<String> alias()
Description copied from interface:BasicColumn
Returns the columns alias if one has been specified.- Specified by:
alias
in interfaceBasicColumn
- Returns:
- the column alias
-
renderWithTableAlias
public String renderWithTableAlias(TableAliasCalculator tableAliasCalculator)
Description copied from interface:BasicColumn
Returns the name of the item aliased with a table name if appropriate. For example, "a.foo". This is appropriate for where clauses and order by clauses.- Specified by:
renderWithTableAlias
in interfaceBasicColumn
- Parameters:
tableAliasCalculator
- the table alias calculator for the current renderer- Returns:
- the item name with the table alias applied
-
as
public StringConstant as(String alias)
Description copied from interface:BindableColumn
Override the base method definition to make it more specific to this interface.- Specified by:
as
in interfaceBasicColumn
- Specified by:
as
in interfaceBindableColumn<String>
- Parameters:
alias
- the column alias to set- Returns:
- new instance with alias set
-
of
public static StringConstant of(String value)
-
-