Interface BasicColumn

All Known Subinterfaces:
BindableColumn<T>
All Known Implementing Classes:
AbstractCount, AbstractTypeConvertingFunction, AbstractUniTypeFunction, Add, Avg, BoundValue, Cast, Concat, Concatenate, Constant, Count, CountAll, CountDistinct, DerivedColumn, Divide, Lower, Max, Min, Multiply, OperatorFunction, SearchedCaseModel, SimpleCaseModel, SqlColumn, StringConstant, SubQueryColumn, Substring, Subtract, Sum, Upper

public interface BasicColumn
Describes attributes of columns that are necessary for rendering if the column is not expected to be bound as a JDBC parameter. Columns in select lists, join expressions, and group by expressions are typically not bound.
Author:
Jeff Butler
  • Method Details

    • alias

      Optional<String> alias()
      Returns the columns alias if one has been specified.
      Returns:
      the column alias
    • as

      BasicColumn as(String alias)
      Returns a new instance of a BasicColumn with the alias set.
      Parameters:
      alias - the column alias to set
      Returns:
      new instance with alias set
    • render

      FragmentAndParameters render(RenderingContext renderingContext)
      Returns a rendering of the column. The rendered fragment should include the table alias based on the TableAliasCalculator in the RenderingContext. The fragment could contain prepared statement parameter markers and associated parameter values if desired.
      Parameters:
      renderingContext - the rendering context (strategy, sequence, etc.)
      Returns:
      a rendered SQL fragment and, optionally, parameters associated with the fragment
      Since:
      1.5.1
    • jdbcType

      default Optional<JDBCType> jdbcType()
    • typeHandler

      default Optional<String> typeHandler()
    • renderingStrategy

      default Optional<RenderingStrategy> renderingStrategy()
    • columnList

      static BasicColumn[] columnList(BasicColumn... columns)
      Utility method to make it easier to build column lists for methods that require an array rather than the varargs method.
      Parameters:
      columns - list of BasicColumn
      Returns:
      an array of BasicColumn