public class SqlColumn<T> extends Object implements BindableColumn<T>, SortSpecification
| Modifier and Type | Class and Description |
|---|---|
static class |
SqlColumn.Builder |
| Modifier and Type | Field and Description |
|---|---|
protected String |
alias |
protected boolean |
isDescending |
protected JDBCType |
jdbcType |
protected String |
name |
protected SqlTable |
table |
protected String |
typeHandler |
| Modifier | Constructor and Description |
|---|---|
protected |
SqlColumn(SqlColumn<?> sqlColumn) |
| Modifier and Type | Method and Description |
|---|---|
Optional<String> |
alias()
Returns the columns alias if one has been specified.
|
String |
aliasOrName()
Return the column alias or column name.
|
SqlColumn<T> |
as(String alias)
Override the base method definition to make it more specific to this interface.
|
SortSpecification |
descending()
Returns a new instance of the SortSpecification that should render as descending in an
ORDER BY clause.
|
boolean |
isDescending()
Return true if the sort order is descending.
|
Optional<JDBCType> |
jdbcType() |
String |
name() |
static <T> SqlColumn<T> |
of(String name,
SqlTable table) |
static <T> SqlColumn<T> |
of(String name,
SqlTable table,
JDBCType jdbcType) |
String |
renderWithTableAlias(TableAliasCalculator tableAliasCalculator)
Returns the name of the item aliased with a table name if appropriate.
|
Optional<String> |
typeHandler() |
static SqlColumn.Builder |
withName(String name) |
SqlColumn<T> |
withTypeHandler(String typeHandler) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcolumnList, renderWithTableAndColumnAliasprotected String name
protected SqlTable table
protected JDBCType jdbcType
protected boolean isDescending
protected String alias
protected String typeHandler
protected SqlColumn(SqlColumn<?> sqlColumn)
public String name()
public Optional<JDBCType> jdbcType()
jdbcType in interface BindableColumn<T>public Optional<String> alias()
BasicColumnalias in interface BasicColumnpublic Optional<String> typeHandler()
typeHandler in interface BindableColumn<T>public SortSpecification descending()
SortSpecificationdescending in interface SortSpecificationpublic SqlColumn<T> as(String alias)
BindableColumnas in interface BasicColumnas in interface BindableColumn<T>alias - the column alias to setpublic boolean isDescending()
SortSpecificationisDescending in interface SortSpecificationpublic String aliasOrName()
SortSpecificationaliasOrName in interface SortSpecificationpublic String renderWithTableAlias(TableAliasCalculator tableAliasCalculator)
BasicColumnrenderWithTableAlias in interface BasicColumntableAliasCalculator - the table alias calculator for the current rendererpublic static SqlColumn.Builder withName(String name)
Copyright © 2016–2019 MyBatis.org. All rights reserved.