T
- The type of the underlying column. For example, if a function converts a VARCHAR to an INT, then the
underlying type will be a StringR
- The type of the column after the conversion. For example, if a function converts a VARCHAR to an INT, then
the converted type will be IntegerU
- the specific subtype that implements the functionpublic abstract class AbstractTypeConvertingFunction<T,R,U extends AbstractTypeConvertingFunction<T,R,U>> extends Object implements BindableColumn<R>
Thanks to @endink for the idea.
Modifier and Type | Field and Description |
---|---|
protected String |
alias |
protected BindableColumn<T> |
column |
Modifier | Constructor and Description |
---|---|
protected |
AbstractTypeConvertingFunction(BindableColumn<T> column) |
Modifier and Type | Method and Description |
---|---|
Optional<String> |
alias()
Returns the columns alias if one has been specified.
|
U |
as(String alias)
Override the base method definition to make it more specific to this interface.
|
protected abstract U |
copy() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
convertParameterType, jdbcType, renderingStrategy, typeHandler
columnList, renderWithTableAlias, renderWithTableAndColumnAlias
protected final BindableColumn<T> column
protected String alias
protected AbstractTypeConvertingFunction(BindableColumn<T> column)
public Optional<String> alias()
BasicColumn
alias
in interface BasicColumn
public U as(String alias)
BindableColumn
as
in interface BasicColumn
as
in interface BindableColumn<R>
alias
- the column alias to setprotected abstract U copy()
Copyright © 2016–2021 MyBatis.org. All rights reserved.