Package org.mybatis.dynamic.sql
Class Constant
- java.lang.Object
-
- org.mybatis.dynamic.sql.Constant
-
- All Implemented Interfaces:
BasicColumn
public class Constant extends java.lang.Object implements BasicColumn
-
-
Method Summary
Modifier and Type Method Description java.util.Optional<java.lang.String>alias()Returns the columns alias if one has been specified.Constantas(java.lang.String alias)Returns a new instance of a BasicColumn with the alias set.static Constantof(java.lang.String value)java.lang.StringrenderWithTableAlias(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
-
-
-
-
Method Detail
-
alias
public java.util.Optional<java.lang.String> alias()
Description copied from interface:BasicColumnReturns the columns alias if one has been specified.- Specified by:
aliasin interfaceBasicColumn- Returns:
- the column alias
-
renderWithTableAlias
public java.lang.String renderWithTableAlias(TableAliasCalculator tableAliasCalculator)
Description copied from interface:BasicColumnReturns 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:
renderWithTableAliasin interfaceBasicColumn- Parameters:
tableAliasCalculator- the table alias calculator for the current renderer- Returns:
- the item name with the table alias applied
-
as
public Constant as(java.lang.String alias)
Description copied from interface:BasicColumnReturns a new instance of a BasicColumn with the alias set.- Specified by:
asin interfaceBasicColumn- Parameters:
alias- the column alias to set- Returns:
- new instance with alias set
-
of
public static Constant of(java.lang.String value)
-
-