Interface ColumnDefinition.Builder<T,B extends ColumnDefinition.Builder<T,B>>

Type Parameters:
T - the underlying type
B - the builder type
All Superinterfaces:
AttributeDefinition.Builder<T,B>
Enclosing interface:
ColumnDefinition<T>

public static interface ColumnDefinition.Builder<T,B extends ColumnDefinition.Builder<T,B>> extends AttributeDefinition.Builder<T,B>
  • Method Details

    • columnClass

      <C> B columnClass(Class<C> columnClass, Column.Converter<T,C> converter)
      Sets the actual column type, and the required Column.Converter.
      Type Parameters:
      C - the column type
      Parameters:
      columnClass - the underlying column type class
      converter - the converter to use when converting to and from column values
      Returns:
      this instance
    • columnClass

      <C> B columnClass(Class<C> columnClass, Column.Converter<T,C> converter, Column.Fetcher<C> fetcher)
      Sets the actual column type, and the required Column.Converter.
      Type Parameters:
      C - the column type
      Parameters:
      columnClass - the underlying column type class
      converter - the converter to use when converting to and from column values
      fetcher - the fetcher to use to retrieve the value from a ResultSet
      Returns:
      this instance
    • name

      B name(String name)
      Sets the actual string used as column name when inserting and updating. This column name is also used when selecting unless an expression(String) has been specified.
      Parameters:
      name - the column name
      Returns:
      this instance
    • expression

      B expression(String expression)
      The expression is used when the column is being selected or used in query conditions.
      Parameters:
      expression - the column expression to use when selecting
      Returns:
      this instance
    • readOnly

      B readOnly(boolean readOnly)
      Specifies whether this column should be included during insert and update operations
      Parameters:
      readOnly - true if this column should be read-only
      Returns:
      this instance
    • insertable

      B insertable(boolean insertable)
      Parameters:
      insertable - specifies whether this column should be included during insert operations
      Returns:
      this instance
    • updatable

      B updatable(boolean updatable)
      Parameters:
      updatable - specifies whether this column is updatable
      Returns:
      this instance
    • columnHasDefaultValue

      B columnHasDefaultValue(boolean columnHasDefaultValue)
      Specifies that the underlying table column has a default value
      Parameters:
      columnHasDefaultValue - true if the column has a default value
      Returns:
      this instance
    • groupBy

      B groupBy(boolean groupBy)
      Specifies that this column should be grouped by. Also specifies that this column is not an aggregate function column.
      Parameters:
      groupBy - true if this is a grouping column
      Returns:
      this instance
    • aggregate

      B aggregate(boolean aggregate)
      Specifies that this column is an aggregate function column. Also specifies that this column should not be grouped by.
      Parameters:
      aggregate - true if this is an aggregate function column
      Returns:
      this instance
    • selectable

      B selectable(boolean selectable)
      Specifies whether this column should be included in select queries
      Parameters:
      selectable - true if this column should be included in select queries
      Returns:
      this instance
    • lazy

      B lazy(boolean lazy)
      Parameters:
      lazy - true if this column should be lazily loaded
      Returns:
      this instance
    • searchable

      B searchable(boolean searchable)
      Specifies whether this column should be included when searching for an entity by a string value. Only applicable to attributes of type Types.VARCHAR.
      Parameters:
      searchable - true if this column is a searchable column
      Returns:
      this instance
      Throws:
      IllegalStateException - in case this column type is not String