public class XPFProduct extends XPFEntity
Constructor and Description |
---|
XPFProduct(@NonNull String code,
@NonNull Map<Locale,String> displayNames,
Instant startDate,
Instant endDate,
@NonNull XPFProductType productType,
@NonNull Set<XPFCategory> categories,
@NonNull Map<Locale,Map<String,XPFAttributeValue>> attributeValues,
boolean bundle,
boolean notSoldSeparately,
boolean hidden,
XPFEntitySupplier<List<XPFProductSku>> productSkus) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
Optional<XPFAttributeValue> |
getAttributeValueByKey(String key,
Locale locale)
Returns the attribute value with the passed key (case insensitive match) and locale.
|
@NonNull Map<Locale,Map<String,XPFAttributeValue>> |
getAttributeValues()
The attribute value map of maps keyed by Locale and then by attribute key.
|
@NonNull Set<XPFCategory> |
getCategories()
The categories that this product is a member of.
|
@NonNull String |
getCode()
The product code.
|
Optional<String> |
getDisplayName(Locale locale)
Get localized display name for a locale with fallback behavior.
|
@NonNull Map<Locale,String> |
getDisplayNames()
The product display name.
|
Instant |
getEndDate()
The end date of this product's availability.
|
List<XPFProductSku> |
getProductSkus()
The product skus associated with this product.
|
@NonNull XPFProductType |
getProductType()
The product type.
|
Instant |
getStartDate()
The start date of this product's availability.
|
int |
hashCode() |
boolean |
isBundle()
Indicates if this product is a bundle.
|
boolean |
isHidden()
Indicates if this product is hidden.
|
boolean |
isNotSoldSeparately()
Indicates if this product can be sold separately.
|
String |
toString() |
getCustomData
public XPFProduct(@NonNull @NonNull String code, @NonNull @NonNull Map<Locale,String> displayNames, Instant startDate, Instant endDate, @NonNull @NonNull XPFProductType productType, @NonNull @NonNull Set<XPFCategory> categories, @NonNull @NonNull Map<Locale,Map<String,XPFAttributeValue>> attributeValues, boolean bundle, boolean notSoldSeparately, boolean hidden, XPFEntitySupplier<List<XPFProductSku>> productSkus)
@LazyLoaded public List<XPFProductSku> getProductSkus()
public Optional<XPFAttributeValue> getAttributeValueByKey(String key, Locale locale)
key
- the attribute keylocale
- the attribute value localepublic Optional<String> getDisplayName(Locale locale)
locale
- The locale to get a display name for.@NonNull public @NonNull String getCode()
@NonNull public @NonNull Map<Locale,String> getDisplayNames()
public Instant getStartDate()
public Instant getEndDate()
@NonNull public @NonNull XPFProductType getProductType()
@NonNull public @NonNull Set<XPFCategory> getCategories()
@NonNull public @NonNull Map<Locale,Map<String,XPFAttributeValue>> getAttributeValues()
public boolean isBundle()
public boolean isNotSoldSeparately()
public boolean isHidden()
Copyright © 2024. All rights reserved.