Package org.mybatis.dynamic.sql
Class DerivedColumn<T>
java.lang.Object
org.mybatis.dynamic.sql.DerivedColumn<T>
- Type Parameters:
T
- The Java type that corresponds to this column - not used except for compiler type checking for conditions
- All Implemented Interfaces:
BasicColumn
,BindableColumn<T>
A derived column is a column that is not directly related to a table. This is primarily
used for supporting sub-queries. The main difference in this class and
SqlColumn
is
that this class does not have a related SqlTable
and therefore ignores any table
qualifier set in a query. If a table qualifier is required it can be set directly in the
builder for this class.-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionalias()
Returns the columns alias if one has been specified.Override the base method definition to make it more specific to this interface.jdbcType()
static <T> DerivedColumn<T>
static <T> DerivedColumn<T>
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, renderingStrategy
-
Constructor Details
-
DerivedColumn
-
-
Method Details
-
alias
Description copied from interface:BasicColumn
Returns the columns alias if one has been specified.- Specified by:
alias
in interfaceBasicColumn
- Returns:
- the column alias
-
jdbcType
- Specified by:
jdbcType
in interfaceBindableColumn<T>
-
typeHandler
- Specified by:
typeHandler
in interfaceBindableColumn<T>
-
renderWithTableAlias
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
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<T>
- Parameters:
columnAlias
- the column alias to set- Returns:
- new instance with alias set
-
of
-
of
-