T
- The data item type that the StaticTableSchema
this builder will build is to map to.public static final class StaticTableSchema.Builder<T> extends Object
StaticTableSchema
Modifier and Type | Method and Description |
---|---|
StaticTableSchema.Builder<T> |
attributes(Attribute.AttributeSupplier<T>... mappedAttributes)
A list of attributes that can be mapped between the data item object and the database record.
|
StaticTableSchema.Builder<T> |
attributes(Collection<Attribute.AttributeSupplier<T>> mappedAttributes)
A list of attributes that can be mapped between the data item object and the database record.
|
StaticTableSchema<T> |
build()
Builds a
StaticTableSchema based on the values this builder has been configured with |
StaticTableSchema.Builder<T> |
extend(StaticTableSchema<? super T> superTableSchema)
Extends the
StaticTableSchema of a super-class, effectively rolling all the attributes modelled by
the super-class into the StaticTableSchema of the sub-class. |
<R> StaticTableSchema.Builder<T> |
flatten(StaticTableSchema<R> otherTableSchema,
Function<T,R> otherItemGetter,
BiConsumer<T,R> otherItemSetter)
Flattens all the attributes defined in another
StaticTableSchema into the database record this schema
maps to. |
StaticTableSchema.Builder<T> |
newItemSupplier(Supplier<T> newItemSupplier)
A function that can be used to create new instances of the data item class.
|
StaticTableSchema.Builder<T> |
tagWith(TableTag... tableTags)
Associate one or more
TableTag with this schema. |
public StaticTableSchema.Builder<T> newItemSupplier(Supplier<T> newItemSupplier)
@SafeVarargs public final StaticTableSchema.Builder<T> attributes(Attribute.AttributeSupplier<T>... mappedAttributes)
public StaticTableSchema.Builder<T> attributes(Collection<Attribute.AttributeSupplier<T>> mappedAttributes)
public <R> StaticTableSchema.Builder<T> flatten(StaticTableSchema<R> otherTableSchema, Function<T,R> otherItemGetter, BiConsumer<T,R> otherItemSetter)
StaticTableSchema
into the database record this schema
maps to. Functions to get and set an object that the flattened schema maps to is required.public StaticTableSchema.Builder<T> extend(StaticTableSchema<? super T> superTableSchema)
StaticTableSchema
of a super-class, effectively rolling all the attributes modelled by
the super-class into the StaticTableSchema
of the sub-class.public StaticTableSchema.Builder<T> tagWith(TableTag... tableTags)
TableTag
with this schema. See documentation on the tags themselves to
understand what each one does.public StaticTableSchema<T> build()
StaticTableSchema
based on the values this builder has been configured withCopyright © 2020. All rights reserved.