Class MyShoppingListDraftBuilder
- All Implemented Interfaces:
Builder<MyShoppingListDraft>
Example to create an instance using the builder pattern
MyShoppingListDraft myShoppingListDraft = MyShoppingListDraft.builder()
.name(nameBuilder -> nameBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionLine Items (containing Products) to add to the ShoppingList.Line Items (containing text values) to add to the ShoppingList.build()
builds MyShoppingListDraft with checking for non-null required valuesbuilds MyShoppingListDraft without checking for non-null required valuescustom
(CustomFieldsDraft custom) Custom Fields defined for the ShoppingList.Custom Fields defined for the ShoppingList.deleteDaysAfterLastModification
(Long deleteDaysAfterLastModification) Number of days after which the ShoppingList will be automatically deleted if it has not been modified.description
(LocalizedString description) Description of the ShoppingList.Description of the ShoppingList.Custom Fields defined for the ShoppingList.Number of days after which the ShoppingList will be automatically deleted if it has not been modified.Description of the ShoppingList.Line Items (containing Products) to add to the ShoppingList.getName()
Name of the ShoppingList.getStore()
Assigns the new ShoppingList to the Store.Line Items (containing text values) to add to the ShoppingList.lineItems
(ShoppingListLineItemDraft... lineItems) Line Items (containing Products) to add to the ShoppingList.lineItems
(List<ShoppingListLineItemDraft> lineItems) Line Items (containing Products) to add to the ShoppingList.name
(LocalizedString name) Name of the ShoppingList.Name of the ShoppingList.static MyShoppingListDraftBuilder
of()
factory method for an instance of MyShoppingListDraftBuilderstatic MyShoppingListDraftBuilder
of
(MyShoppingListDraft template) create builder for MyShoppingListDraft instanceplusLineItems
(ShoppingListLineItemDraft... lineItems) Line Items (containing Products) to add to the ShoppingList.Line Items (containing Products) to add to the ShoppingList.plusTextLineItems
(TextLineItemDraft... textLineItems) Line Items (containing text values) to add to the ShoppingList.Line Items (containing text values) to add to the ShoppingList.Line Items (containing Products) to add to the ShoppingList.Line Items (containing text values) to add to the ShoppingList.store
(StoreResourceIdentifier store) Assigns the new ShoppingList to the Store.Assigns the new ShoppingList to the Store.textLineItems
(TextLineItemDraft... textLineItems) Line Items (containing text values) to add to the ShoppingList.textLineItems
(List<TextLineItemDraft> textLineItems) Line Items (containing text values) to add to the ShoppingList.Custom Fields defined for the ShoppingList.Description of the ShoppingList.Line Items (containing Products) to add to the ShoppingList.Name of the ShoppingList.Assigns the new ShoppingList to the Store.Line Items (containing text values) to add to the ShoppingList.
-
Constructor Details
-
MyShoppingListDraftBuilder
public MyShoppingListDraftBuilder()
-
-
Method Details
-
name
public MyShoppingListDraftBuilder name(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Name of the ShoppingList.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
withName
public MyShoppingListDraftBuilder withName(Function<LocalizedStringBuilder, LocalizedString> builder) Name of the ShoppingList.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
name
Name of the ShoppingList.
- Parameters:
name
- value to be set- Returns:
- Builder
-
description
public MyShoppingListDraftBuilder description(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Description of the ShoppingList.
- Parameters:
builder
- function to build the description value- Returns:
- Builder
-
withDescription
public MyShoppingListDraftBuilder withDescription(Function<LocalizedStringBuilder, LocalizedString> builder) Description of the ShoppingList.
- Parameters:
builder
- function to build the description value- Returns:
- Builder
-
description
Description of the ShoppingList.
- Parameters:
description
- value to be set- Returns:
- Builder
-
lineItems
Line Items (containing Products) to add to the ShoppingList.
- Parameters:
lineItems
- value to be set- Returns:
- Builder
-
lineItems
Line Items (containing Products) to add to the ShoppingList.
- Parameters:
lineItems
- value to be set- Returns:
- Builder
-
plusLineItems
Line Items (containing Products) to add to the ShoppingList.
- Parameters:
lineItems
- value to be set- Returns:
- Builder
-
plusLineItems
public MyShoppingListDraftBuilder plusLineItems(Function<ShoppingListLineItemDraftBuilder, ShoppingListLineItemDraftBuilder> builder) Line Items (containing Products) to add to the ShoppingList.
- Parameters:
builder
- function to build the lineItems value- Returns:
- Builder
-
withLineItems
public MyShoppingListDraftBuilder withLineItems(Function<ShoppingListLineItemDraftBuilder, ShoppingListLineItemDraftBuilder> builder) Line Items (containing Products) to add to the ShoppingList.
- Parameters:
builder
- function to build the lineItems value- Returns:
- Builder
-
addLineItems
public MyShoppingListDraftBuilder addLineItems(Function<ShoppingListLineItemDraftBuilder, ShoppingListLineItemDraft> builder) Line Items (containing Products) to add to the ShoppingList.
- Parameters:
builder
- function to build the lineItems value- Returns:
- Builder
-
setLineItems
public MyShoppingListDraftBuilder setLineItems(Function<ShoppingListLineItemDraftBuilder, ShoppingListLineItemDraft> builder) Line Items (containing Products) to add to the ShoppingList.
- Parameters:
builder
- function to build the lineItems value- Returns:
- Builder
-
textLineItems
Line Items (containing text values) to add to the ShoppingList.
- Parameters:
textLineItems
- value to be set- Returns:
- Builder
-
textLineItems
Line Items (containing text values) to add to the ShoppingList.
- Parameters:
textLineItems
- value to be set- Returns:
- Builder
-
plusTextLineItems
Line Items (containing text values) to add to the ShoppingList.
- Parameters:
textLineItems
- value to be set- Returns:
- Builder
-
plusTextLineItems
public MyShoppingListDraftBuilder plusTextLineItems(Function<TextLineItemDraftBuilder, TextLineItemDraftBuilder> builder) Line Items (containing text values) to add to the ShoppingList.
- Parameters:
builder
- function to build the textLineItems value- Returns:
- Builder
-
withTextLineItems
public MyShoppingListDraftBuilder withTextLineItems(Function<TextLineItemDraftBuilder, TextLineItemDraftBuilder> builder) Line Items (containing text values) to add to the ShoppingList.
- Parameters:
builder
- function to build the textLineItems value- Returns:
- Builder
-
addTextLineItems
public MyShoppingListDraftBuilder addTextLineItems(Function<TextLineItemDraftBuilder, TextLineItemDraft> builder) Line Items (containing text values) to add to the ShoppingList.
- Parameters:
builder
- function to build the textLineItems value- Returns:
- Builder
-
setTextLineItems
public MyShoppingListDraftBuilder setTextLineItems(Function<TextLineItemDraftBuilder, TextLineItemDraft> builder) Line Items (containing text values) to add to the ShoppingList.
- Parameters:
builder
- function to build the textLineItems value- Returns:
- Builder
-
custom
public MyShoppingListDraftBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields defined for the ShoppingList.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
public MyShoppingListDraftBuilder withCustom(Function<CustomFieldsDraftBuilder, CustomFieldsDraft> builder) Custom Fields defined for the ShoppingList.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields defined for the ShoppingList.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
deleteDaysAfterLastModification
public MyShoppingListDraftBuilder deleteDaysAfterLastModification(@Nullable Long deleteDaysAfterLastModification) Number of days after which the ShoppingList will be automatically deleted if it has not been modified. If not set, the default value configured in the Project is used.
- Parameters:
deleteDaysAfterLastModification
- value to be set- Returns:
- Builder
-
store
public MyShoppingListDraftBuilder store(Function<StoreResourceIdentifierBuilder, StoreResourceIdentifierBuilder> builder) Assigns the new ShoppingList to the Store. The Store assignment can not be modified.
- Parameters:
builder
- function to build the store value- Returns:
- Builder
-
withStore
public MyShoppingListDraftBuilder withStore(Function<StoreResourceIdentifierBuilder, StoreResourceIdentifier> builder) Assigns the new ShoppingList to the Store. The Store assignment can not be modified.
- Parameters:
builder
- function to build the store value- Returns:
- Builder
-
store
Assigns the new ShoppingList to the Store. The Store assignment can not be modified.
- Parameters:
store
- value to be set- Returns:
- Builder
-
getName
Name of the ShoppingList.
- Returns:
- name
-
getDescription
Description of the ShoppingList.
- Returns:
- description
-
getLineItems
Line Items (containing Products) to add to the ShoppingList.
- Returns:
- lineItems
-
getTextLineItems
Line Items (containing text values) to add to the ShoppingList.
- Returns:
- textLineItems
-
getCustom
Custom Fields defined for the ShoppingList.
- Returns:
- custom
-
getDeleteDaysAfterLastModification
Number of days after which the ShoppingList will be automatically deleted if it has not been modified. If not set, the default value configured in the Project is used.
- Returns:
- deleteDaysAfterLastModification
-
getStore
Assigns the new ShoppingList to the Store. The Store assignment can not be modified.
- Returns:
- store
-
build
builds MyShoppingListDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<MyShoppingListDraft>
- Returns:
- MyShoppingListDraft
-
buildUnchecked
builds MyShoppingListDraft without checking for non-null required values- Returns:
- MyShoppingListDraft
-
of
factory method for an instance of MyShoppingListDraftBuilder- Returns:
- builder
-
of
create builder for MyShoppingListDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-