public PriceBuilder channel(final Referenceable<Channel> channel) { Objects.requireNonNull(channel); return channel(Optional.of(channel.toReference())); }
public PriceBuilder channel(final Referenceable<Channel> channel) { Objects.requireNonNull(channel); return channel(Optional.of(channel.toReference())); }
public Price withChannel(@Nullable final Referenceable<Channel> channel) { final Reference<Channel> channelReference = Optional.ofNullable(channel).map(Referenceable::toReference).orElse(null); return PriceBuilder.of(this).channel(channelReference).build(); }
default Price withChannel(@Nullable final Referenceable<Channel> channel) { final Reference<Channel> channelReference = Optional.ofNullable(channel).map(Referenceable::toReference).orElse(null); return PriceBuilder.of(this).channel(channelReference).build(); }
default Price withChannel(@Nullable final Referenceable<Channel> channel) { final Reference<Channel> channelReference = Optional.ofNullable(channel).map(Referenceable::toReference).orElse(null); return PriceBuilder.of(this).channel(channelReference).build(); }
public Price withChannel(final Optional<Reference<Channel>> channel) { return PriceBuilder.of(this).channel(channel).build(); }
public Price withChannel(final Optional<Reference<Channel>> channel) { return PriceBuilder.of(this).channel(channel).build(); }
public static PriceBuilder of(final Price template) { return of(template.getValue()) .country(template.getCountry()) .customerGroup(template.getCustomerGroup()) .channel(template.getChannel()) .discounted(template.getDiscounted()); }
public static PriceBuilder of(final Price template) { return of(template.getValue()) .country(template.getCountry()) .customerGroup(template.getCustomerGroup()) .channel(template.getChannel()) .discounted(template.getDiscounted()); }
public static PriceBuilder of(final Price template) { return of(template.getValue()) .country(template.getCountry()) .customerGroup(template.getCustomerGroup()) .channel(template.getChannel()) .discounted(template.getDiscounted()) .validFrom(template.getValidFrom()) .validUntil(template.getValidUntil()) .id(template.getId()); }