Class MetadataBuilder
java.lang.Object
cloud.quinimbus.persistence.api.schema.MetadataBuilder
@Generated("io.soabase.recordbuilder.core.RecordBuilder")
public class MetadataBuilder
extends Object
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdd to the internally allocatedHashSet
forentityTypeMigrationRuns
addEntityTypeMigrationRuns
(Iterable<? extends Metadata.MigrationRun> i) Add to the internally allocatedHashSet
forentityTypeMigrationRuns
addEntityTypeMigrationRuns
(Stream<? extends Metadata.MigrationRun> i) Add to the internally allocatedHashSet
forentityTypeMigrationRuns
build()
Return a new record instance with all fields set to the current values in this builderstatic MetadataBuilder
builder()
Return a new builder with all fields set to default Java valuesstatic MetadataBuilder
Return a new builder with all fields set to the values taken from the given record instanceReturn the current value for thecreationTime
record component in the buildercreationTime
(Instant creationTime) Set a new value for thecreationTime
record component in the builderReturn the current value for theentityTypeMigrationRuns
record component in the builderentityTypeMigrationRuns
(Collection<? extends Metadata.MigrationRun> entityTypeMigrationRuns) Re-create the internally allocatedSet<Metadata.MigrationRun>
forentityTypeMigrationRuns
by copying the argumentboolean
static MetadataBuilder.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 Metadata
Metadata
(String id, Long version, Instant creationTime, Set<Metadata.MigrationRun> entityTypeMigrationRuns) 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
-
Metadata
@Generated("io.soabase.recordbuilder.core.RecordBuilder") public static Metadata Metadata(String id, Long version, Instant creationTime, Set<Metadata.MigrationRun> entityTypeMigrationRuns) Static constructor/builder. Can be used instead of new Metadata(...) -
builder
Return a new builder with all fields set to default Java values -
builder
@Generated("io.soabase.recordbuilder.core.RecordBuilder") public static MetadataBuilder builder(Metadata 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 MetadataBuilder.With from(Metadata 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(Metadata 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 -
version
@Generated("io.soabase.recordbuilder.core.RecordBuilder") public MetadataBuilder 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 -
creationTime
@Generated("io.soabase.recordbuilder.core.RecordBuilder") public MetadataBuilder creationTime(Instant creationTime) Set a new value for thecreationTime
record component in the builder -
creationTime
Return the current value for thecreationTime
record component in the builder -
entityTypeMigrationRuns
@Generated("io.soabase.recordbuilder.core.RecordBuilder") public MetadataBuilder entityTypeMigrationRuns(Collection<? extends Metadata.MigrationRun> entityTypeMigrationRuns) Re-create the internally allocatedSet<Metadata.MigrationRun>
forentityTypeMigrationRuns
by copying the argument -
entityTypeMigrationRuns
@Generated("io.soabase.recordbuilder.core.RecordBuilder") public Set<Metadata.MigrationRun> entityTypeMigrationRuns()Return the current value for theentityTypeMigrationRuns
record component in the builder -
addEntityTypeMigrationRuns
@Generated("io.soabase.recordbuilder.core.RecordBuilder") public MetadataBuilder addEntityTypeMigrationRuns(Metadata.MigrationRun i) Add to the internally allocatedHashSet
forentityTypeMigrationRuns
-
addEntityTypeMigrationRuns
@Generated("io.soabase.recordbuilder.core.RecordBuilder") public MetadataBuilder addEntityTypeMigrationRuns(Stream<? extends Metadata.MigrationRun> i) Add to the internally allocatedHashSet
forentityTypeMigrationRuns
-
addEntityTypeMigrationRuns
@Generated("io.soabase.recordbuilder.core.RecordBuilder") public MetadataBuilder addEntityTypeMigrationRuns(Iterable<? extends Metadata.MigrationRun> i) Add to the internally allocatedHashSet
forentityTypeMigrationRuns
-