Interface ColumnProperty.Builder<T,​B extends ColumnProperty.Builder<T,​B>>

  • Type Parameters:
    T - the underlying type
    B - the builder type
    All Superinterfaces:
    Property.Builder<T,​B>
    All Known Subinterfaces:
    BlobProperty.Builder
    Enclosing interface:
    ColumnProperty<T>

    public static interface ColumnProperty.Builder<T,​B extends ColumnProperty.Builder<T,​B>>
    extends Property.Builder<T,​B>
    Provides setters for ColumnProperty properties
    • Method Detail

      • columnClass

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

        <C> B columnClass​(Class<C> columnClass,
                          ColumnProperty.ValueConverter<T,​C> valueConverter,
                          ColumnProperty.ValueFetcher<C> valueFetcher)
        Sets the actual column type, and the required ColumnProperty.ValueConverter.
        Type Parameters:
        C - the column type
        Parameters:
        columnClass - the underlying column type class
        valueConverter - the converter to use when converting to and from column values
        valueFetcher - the value fetcher used to retrieve the value from a ResultSet
        Returns:
        this instance
      • columnName

        B columnName​(String columnName)
        Sets the actual string used as column when querying
        Parameters:
        columnName - the column name
        Returns:
        this instance
      • columnExpression

        B columnExpression​(String columnExpression)
        Parameters:
        columnExpression - the column expression to use when selecting
        Returns:
        this instance
      • readOnly

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

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

        B updatable​(boolean updatable)
        Parameters:
        updatable - specifies whether this property 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
      • primaryKeyIndex

        B primaryKeyIndex​(int index)
        Sets the zero based primary key index of this property. Note that setting the primary key index renders this property non-null and non-updatable by default, these can be reverted by setting it as updatable and/or nullable after setting the primary key index.
        Parameters:
        index - the zero based index
        Returns:
        this instance
        Throws:
        IllegalArgumentException - in case index is a negative number
        See Also:
        Property.Builder.nullable(boolean), updatable(boolean)
      • groupingColumn

        B groupingColumn​(boolean groupingColumn)
        Specifies that this column should be used in a group by clause. Also specifies that this column should not be an aggregate column.
        Parameters:
        groupingColumn - true if this is a grouping column
        Returns:
        this instance
      • aggregateColumn

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

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

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