Class RecordBuilder
Example to create an instance using the builder pattern
Record record = Record.builder()
.version(1)
.previousVersion(1)
.type("{type}")
.modifiedBy(modifiedByBuilder -> modifiedByBuilder)
.modifiedAt("{modifiedAt}")
.label(labelBuilder -> labelBuilder)
.previousLabel(previousLabelBuilder -> previousLabelBuilder)
.plusChanges(changesBuilder -> changesBuilder)
.resource(resourceBuilder -> resourceBuilder)
.plusStores(storesBuilder -> storesBuilder)
.withoutChanges(true)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddStores
(Function<KeyReferenceBuilder, KeyReference> builder) References to the Stores associated with the Change.build()
builds Record with checking for non-null required valuesbuilds Record without checking for non-null required valuesbusinessUnit
(KeyReference businessUnit) Reference to the Business Unit associated with the Change.Reference to the Business Unit associated with the Change.Shows the differences in the resource betweenpreviousVersion
andversion
.Shows the differences in the resource betweenpreviousVersion
andversion
.Reference to the Business Unit associated with the Change.Shows the differences in the resource betweenpreviousVersion
andversion
.getLabel()
Information that describes the resource after the change.Date and time (UTC) the change was made.Information about the user or API Client who performed the change.Information that describes the resource before the change.Version of the resource before the change.ResourceIdentifier of the changed resource.References to the Stores associated with the Change.getType()
Indicates the type of change.Version of the resource after the change.true
if no change was detected.Information that describes the resource after the change.label
(Function<LabelBuilder, Builder<? extends Label>> builder) Information that describes the resource after the change.modifiedAt
(String modifiedAt) Date and time (UTC) the change was made.modifiedBy
(ModifiedBy modifiedBy) Information about the user or API Client who performed the change.modifiedBy
(Function<ModifiedByBuilder, ModifiedByBuilder> builder) Information about the user or API Client who performed the change.static RecordBuilder
of()
factory method for an instance of RecordBuilderstatic RecordBuilder
create builder for Record instanceplusChanges
(Change... changes) Shows the differences in the resource betweenpreviousVersion
andversion
.plusChanges
(Function<ChangeBuilder, Builder<? extends Change>> builder) Shows the differences in the resource betweenpreviousVersion
andversion
.plusStores
(KeyReference... stores) References to the Stores associated with the Change.References to the Stores associated with the Change.previousLabel
(Label previousLabel) Information that describes the resource before the change.previousLabel
(Function<LabelBuilder, Builder<? extends Label>> builder) Information that describes the resource before the change.previousVersion
(Integer previousVersion) Version of the resource before the change.resource
(ResourceIdentifier resource) ResourceIdentifier of the changed resource.ResourceIdentifier of the changed resource.setStores
(Function<KeyReferenceBuilder, KeyReference> builder) References to the Stores associated with the Change.stores
(KeyReference... stores) References to the Stores associated with the Change.stores
(List<KeyReference> stores) References to the Stores associated with the Change.Indicates the type of change.Version of the resource after the change.Reference to the Business Unit associated with the Change.withChanges
(Function<ChangeBuilder, Builder<? extends Change>> builder) Shows the differences in the resource betweenpreviousVersion
andversion
.withModifiedBy
(Function<ModifiedByBuilder, ModifiedBy> builder) Information about the user or API Client who performed the change.withoutChanges
(Boolean withoutChanges) true
if no change was detected.ResourceIdentifier of the changed resource.References to the Stores associated with the Change.
-
Constructor Details
-
RecordBuilder
public RecordBuilder()
-
-
Method Details
-
version
Version of the resource after the change.
For more information on how the version is incremented, see Optimistic Concurrency Control.
- Parameters:
version
- value to be set- Returns:
- Builder
-
previousVersion
Version of the resource before the change.
- Parameters:
previousVersion
- value to be set- Returns:
- Builder
-
type
Indicates the type of change. For creation, update, or deletion, the value is
"ResourceCreated"
,"ResourceUpdated"
, or"ResourceDeleted"
respectively.- Parameters:
type
- value to be set- Returns:
- Builder
-
modifiedBy
Information about the user or API Client who performed the change.
- Parameters:
builder
- function to build the modifiedBy value- Returns:
- Builder
-
withModifiedBy
Information about the user or API Client who performed the change.
- Parameters:
builder
- function to build the modifiedBy value- Returns:
- Builder
-
modifiedBy
Information about the user or API Client who performed the change.
- Parameters:
modifiedBy
- value to be set- Returns:
- Builder
-
modifiedAt
Date and time (UTC) the change was made.
- Parameters:
modifiedAt
- value to be set- Returns:
- Builder
-
label
Information that describes the resource after the change.
- Parameters:
label
- value to be set- Returns:
- Builder
-
label
Information that describes the resource after the change.
- Parameters:
builder
- function to build the label value- Returns:
- Builder
-
previousLabel
Information that describes the resource before the change.
- Parameters:
previousLabel
- value to be set- Returns:
- Builder
-
previousLabel
Information that describes the resource before the change.
- Parameters:
builder
- function to build the previousLabel value- Returns:
- Builder
-
changes
Shows the differences in the resource between
previousVersion
andversion
.The value is not identical to the actual array of update actions sent and is not limited to update actions (see, for example, Optimistic Concurrency Control).
- Parameters:
changes
- value to be set- Returns:
- Builder
-
changes
Shows the differences in the resource between
previousVersion
andversion
.The value is not identical to the actual array of update actions sent and is not limited to update actions (see, for example, Optimistic Concurrency Control).
- Parameters:
changes
- value to be set- Returns:
- Builder
-
plusChanges
Shows the differences in the resource between
previousVersion
andversion
.The value is not identical to the actual array of update actions sent and is not limited to update actions (see, for example, Optimistic Concurrency Control).
- Parameters:
changes
- value to be set- Returns:
- Builder
-
plusChanges
Shows the differences in the resource between
previousVersion
andversion
.The value is not identical to the actual array of update actions sent and is not limited to update actions (see, for example, Optimistic Concurrency Control).
- Parameters:
builder
- function to build the changes value- Returns:
- Builder
-
withChanges
Shows the differences in the resource between
previousVersion
andversion
.The value is not identical to the actual array of update actions sent and is not limited to update actions (see, for example, Optimistic Concurrency Control).
- Parameters:
builder
- function to build the changes value- Returns:
- Builder
-
resource
public RecordBuilder resource(Function<ResourceIdentifierBuilder, ResourceIdentifierBuilder> builder) ResourceIdentifier of the changed resource.
- Parameters:
builder
- function to build the resource value- Returns:
- Builder
-
withResource
ResourceIdentifier of the changed resource.
- Parameters:
builder
- function to build the resource value- Returns:
- Builder
-
resource
ResourceIdentifier of the changed resource.
- Parameters:
resource
- value to be set- Returns:
- Builder
-
stores
References to the Stores associated with the Change.
- Parameters:
stores
- value to be set- Returns:
- Builder
-
stores
References to the Stores associated with the Change.
- Parameters:
stores
- value to be set- Returns:
- Builder
-
plusStores
References to the Stores associated with the Change.
- Parameters:
stores
- value to be set- Returns:
- Builder
-
plusStores
References to the Stores associated with the Change.
- Parameters:
builder
- function to build the stores value- Returns:
- Builder
-
withStores
References to the Stores associated with the Change.
- Parameters:
builder
- function to build the stores value- Returns:
- Builder
-
addStores
References to the Stores associated with the Change.
- Parameters:
builder
- function to build the stores value- Returns:
- Builder
-
setStores
References to the Stores associated with the Change.
- Parameters:
builder
- function to build the stores value- Returns:
- Builder
-
businessUnit
Reference to the Business Unit associated with the Change.
- Parameters:
builder
- function to build the businessUnit value- Returns:
- Builder
-
withBusinessUnit
Reference to the Business Unit associated with the Change.
- Parameters:
builder
- function to build the businessUnit value- Returns:
- Builder
-
businessUnit
Reference to the Business Unit associated with the Change.
- Parameters:
businessUnit
- value to be set- Returns:
- Builder
-
withoutChanges
true
if no change was detected.The version number of the resource can be increased even without any change in the resource.
- Parameters:
withoutChanges
- value to be set- Returns:
- Builder
-
getVersion
Version of the resource after the change.
For more information on how the version is incremented, see Optimistic Concurrency Control.
- Returns:
- version
-
getPreviousVersion
Version of the resource before the change.
- Returns:
- previousVersion
-
getType
Indicates the type of change. For creation, update, or deletion, the value is
"ResourceCreated"
,"ResourceUpdated"
, or"ResourceDeleted"
respectively.- Returns:
- type
-
getModifiedBy
Information about the user or API Client who performed the change.
- Returns:
- modifiedBy
-
getModifiedAt
Date and time (UTC) the change was made.
- Returns:
- modifiedAt
-
getLabel
Information that describes the resource after the change.
- Returns:
- label
-
getPreviousLabel
Information that describes the resource before the change.
- Returns:
- previousLabel
-
getChanges
Shows the differences in the resource between
previousVersion
andversion
.The value is not identical to the actual array of update actions sent and is not limited to update actions (see, for example, Optimistic Concurrency Control).
- Returns:
- changes
-
getResource
ResourceIdentifier of the changed resource.
- Returns:
- resource
-
getStores
References to the Stores associated with the Change.
- Returns:
- stores
-
getBusinessUnit
Reference to the Business Unit associated with the Change.
- Returns:
- businessUnit
-
getWithoutChanges
true
if no change was detected.The version number of the resource can be increased even without any change in the resource.
- Returns:
- withoutChanges
-
build
builds Record with checking for non-null required values -
buildUnchecked
builds Record without checking for non-null required values- Returns:
- Record
-
of
factory method for an instance of RecordBuilder- Returns:
- builder
-
of
create builder for Record instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-