/** * Creates a new builder with the values of this object. * * @return new builder */ public ProductDraftBuilder newBuilder() { return new ProductDraftBuilder(categories, categoryOrderHints, description, key, masterVariant, metaDescription, metaKeywords, metaTitle, name, productType, publish, searchKeywords, slug, state, taxCategory, variants); }
/** * Creates a new object initialized with the given values. * * @param productType initial value for the {@link ProductDraft#getProductType()} property * @param name initial value for the {@link ProductDraft#getName()} property * @param slug initial value for the {@link ProductDraft#getSlug()} property * @param masterVariant initial value for the {@link ProductDraft#getMasterVariant()} property * @return new object initialized with the given values */ public static ProductDraftBuilder of(final ResourceIdentifier<ProductType> productType, final LocalizedString name, final LocalizedString slug, @Nullable final ProductVariantDraft masterVariant) { return new ProductDraftBuilder(null, null, null, null, masterVariant, null, null, null, name, productType, null, null, slug, null, null, null); }
public static ProductDraftBuilder of(final ResourceIdentifiable<ProductType> productType, final LocalizedString name, final LocalizedString slug, final ProductVariantDraft masterVariant) { return new ProductDraftBuilder(productType.toResourceIdentifier(), name, slug, masterVariant); }
public static ProductDraftBuilder of(final Referenceable<ProductType> productType, LocalizedStrings name, LocalizedStrings slug, final ProductVariantDraft masterVariant) { return new ProductDraftBuilder(productType.toReference(), name, slug, masterVariant); }
public static ProductDraftBuilder of(final Referenceable<ProductType> productType, LocalizedStrings name, LocalizedStrings slug, final ProductVariantDraft masterVariant) { return new ProductDraftBuilder(productType.toReference(), name, slug, masterVariant); }
/** * Creates a new object initialized with the fields of the template parameter. * * @param template the template * @return a new object initialized from the template */ public static ProductDraftBuilder of(final ProductDraft template) { return new ProductDraftBuilder(template.getCategories(), template.getCategoryOrderHints(), template.getDescription(), template.getKey(), template.getMasterVariant(), template.getMetaDescription(), template.getMetaKeywords(), template.getMetaTitle(), template.getName(), template.getProductType(), template.isPublish(), template.getSearchKeywords(), template.getSlug(), template.getState(), template.getTaxCategory(), template.getVariants()); } }