Class SchemaBuilder
java.lang.Object
cloud.quinimbus.persistence.api.schema.SchemaBuilder
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddEntityTypes
(Iterable<? extends Map.Entry<? extends String, ? extends EntityType>> i) Add to the internally allocatedHashMap
forentityTypes
addEntityTypes
(String key, EntityType value) Add to the internally allocatedHashMap
forentityTypes
addEntityTypes
(Stream<? extends Map.Entry<? extends String, ? extends EntityType>> i) Add to the internally allocatedHashMap
forentityTypes
build()
Return a new record instance with all fields set to the current values in this builderstatic SchemaBuilder
builder()
Return a new builder with all fields set to default Java valuesstatic SchemaBuilder
Return a new builder with all fields set to the values taken from the given record instanceReturn the current value for theentityTypes
record component in the builderentityTypes
(Map<? extends String, ? extends EntityType> entityTypes) Re-create the internally allocatedMap<String, EntityType>
forentityTypes
by copying the argumentboolean
static SchemaBuilder.With
Return a "with"er for an existing record instanceint
hashCode()
id()
Return the current value for theid
record component in the builderSet a new value for theid
record component in the builderstatic Schema
Static constructor/builder.Return a stream of the record components as map entries keyed with the component name and the value as the component valuetoString()
version()
Return the current value for theversion
record component in the builderSet a new value for theversion
record component in the builder
-
Method Details
-
Schema
@Generated("io.soabase.recordbuilder.core.RecordBuilder") public static Schema Schema(String id, Map<String, EntityType> entityTypes, Long version) Static constructor/builder. Can be used instead of new Schema(...) -
builder
Return a new builder with all fields set to default Java values -
builder
@Generated("io.soabase.recordbuilder.core.RecordBuilder") public static SchemaBuilder builder(Schema from) Return a new builder with all fields set to the values taken from the given record instance -
from
@Generated("io.soabase.recordbuilder.core.RecordBuilder") public static SchemaBuilder.With from(Schema from) Return a "with"er for an existing record instance -
stream
@Generated("io.soabase.recordbuilder.core.RecordBuilder") public static Stream<Map.Entry<String,Object>> stream(Schema record) Return a stream of the record components as map entries keyed with the component name and the value as the component value -
build
Return a new record instance with all fields set to the current values in this builder -
toString
-
hashCode
-
equals
-
id
Set a new value for theid
record component in the builder -
id
Return the current value for theid
record component in the builder -
entityTypes
@Generated("io.soabase.recordbuilder.core.RecordBuilder") public SchemaBuilder entityTypes(Map<? extends String, ? extends EntityType> entityTypes) Re-create the internally allocatedMap<String, EntityType>
forentityTypes
by copying the argument -
entityTypes
@Generated("io.soabase.recordbuilder.core.RecordBuilder") public Map<String,EntityType> entityTypes()Return the current value for theentityTypes
record component in the builder -
addEntityTypes
@Generated("io.soabase.recordbuilder.core.RecordBuilder") public SchemaBuilder addEntityTypes(String key, EntityType value) Add to the internally allocatedHashMap
forentityTypes
-
addEntityTypes
@Generated("io.soabase.recordbuilder.core.RecordBuilder") public SchemaBuilder addEntityTypes(Stream<? extends Map.Entry<? extends String, ? extends EntityType>> i) Add to the internally allocatedHashMap
forentityTypes
-
addEntityTypes
@Generated("io.soabase.recordbuilder.core.RecordBuilder") public SchemaBuilder addEntityTypes(Iterable<? extends Map.Entry<? extends String, ? extends EntityType>> i) Add to the internally allocatedHashMap
forentityTypes
-
version
@Generated("io.soabase.recordbuilder.core.RecordBuilder") public SchemaBuilder version(Long version) Set a new value for theversion
record component in the builder -
version
Return the current value for theversion
record component in the builder
-