Module is.codion.framework.domain
Interface ColumnTemplate<T>
- Type Parameters:
T- the column type
public interface ColumnTemplate<T>
Specifies a column template configuration.
ColumnTemplate<Integer> REQUIRED_POSITIVE =
column -> column
.nullable(false)
.minimum(0);
Customer.AGE.define()
.column(REQUIRED_POSITIVE)
.caption("Age")
-
Method Summary
Modifier and TypeMethodDescriptiondefault ColumnTemplate<T> and(ColumnTemplate<T> template) Returns a composed template that applies this template followed by the given template.apply(ColumnDefinition.Builder<T, ?> column) Applies this column template to the given column definition builder
-
Method Details
-
apply
Applies this column template to the given column definition builder- Parameters:
column- the column definition builder- Returns:
- the column definition builder
-
and
Returns a composed template that applies this template followed by the given template.ColumnTemplate<String> REQUIRED = column -> column.nullable(false); ColumnTemplate<String> SEARCHABLE = column -> column.searchable(true); ColumnTemplate<String> REQUIRED_SEARCHABLE = REQUIRED.and(SEARCHABLE); // Equivalent to: column -> column.nullable(false).searchable(true)- Parameters:
template- the template to apply after this template- Returns:
- a composed template that applies this template followed by the given template
-