Class SkuImpl
- All Implemented Interfaces:
Serializable,MultiTenantCloneable<Sku>,Indexable,Sku,SkuAdminPresentation
Sku. A SKU is a specific item that can
be sold including any specific attributes of the item such as color or size. If you want to add fields specific to your implementation of BroadLeafCommerce you should extend this class and add your fields. If you need to make significant changes to the SkuImpl then you should implement your own version of
Sku.This implementation uses a Hibernate implementation of JPA configured through annotations. The Entity references the following tables: BLC_SKU, BLC_SKU_IMAGE
!!!!!!!!!!!!!!!!!
For admin required field validation, if this Sku is apart of an additionalSkus list (meaning
it is not a defaultSku) then
it should have no required restrictions on it. All additional Skus can delegate to the defaultSku
of the related product for all of its fields. For this reason, if you would like to mark more
fields as required then rather than using AdminPresentation.requiredOverride(), use the
mo:overrides section in bl-admin-applicationContext.xml for Product and reference each required
field like 'defaultSku.name' or 'defaultSku.retailPrice'.
- Author:
- btaylor
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.broadleafcommerce.core.catalog.domain.SkuAdminPresentation
SkuAdminPresentation.FieldOrder, SkuAdminPresentation.GroupName, SkuAdminPresentation.GroupOrder, SkuAdminPresentation.TabName, SkuAdminPresentation.TabOrder -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Dateprotected Dateprotected CharacterDeprecated.protected BigDecimalprotected BroadleafCurrencyNote that this field is not the target of the currencyCodeField attribute on either retailPrice or salePrice.protected ProductThis will be non-null if and only if this Sku is the default Sku for a Productprotected Stringprotected Dimensionprotected Characterprotected Stringprotected List<FulfillmentOption>protected Stringprotected Map<FulfillmentOption,BigDecimal> protected Stringprotected Longprotected Stringprotected Booleanprotected Set<ProductOptionValue>protected Stringprotected Stringprotected ProductThis relationship will be non-null if and only if this Sku is contained in the list of additional Skus for a Product (for Skus based on ProductOptions)protected Set<SkuProductOptionValueXref>protected Integerprotected BigDecimalprotected BigDecimalprotected List<SkuAttribute>protected Map<String,SkuMediaXref> protected Characterprotected Stringprotected Stringprotected Stringprotected Weight -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClears any currently stored dynamic pricing<G extends Sku>
CreateResponse<G>booleanReturns the the last date that the Sku should be available for sale.Returns the first date that the Sku should be available for sale.Convenience that passes through to isAvailableReturns the basic retail price of the Sku.Returns the basic sale price of the Sku.getCost()Returns the purchase cost of this Sku.Note: When using dynamic pricing, this method is unreliable and should not be called outside of the Broadleaf admin Instead, you should rely on theBroadleafRequestContext.getBroadleafCurrency()instead of storing at the SKU level.This will be a value if and only if this Sku is the defaultSku of a Product (and thus has a @OneToOne relationship with a Product).Returns the brief description of the Sku.Get the dimensions for this SkuReturns the name of a display template that is used to render this sku.Gets theFulfillmentOptions that thisSkushould be excluded from.Intended to hold any unique identifier not tied to the Broadleaf Database Sequence Identifier.getFees()Gets all the extra fees for this particular Sku.Which type ofFieldshould be queried for when looking up database-driven search fields to store in the search indexGets the flat rate for fulfilling thisSkufor a particularFulfillmentOption.Returns the fulfillment type for this sku.getId()Returns the id of this skuReturns the type of inventory for this skuWhether this Sku can be sorted by a machineDeprecated.Returns the long description of the sku.Returns the margin of the Sku.Returns multivalued SkuAttributes associated with this sku usingMultiValueMap.getName()Returns the name of the Sku.getPrice()Resolves the price of the Sku.If a DynamicPricingService is being used, this method will return the dynamic Sku prices.Returns the primaryMediafor this SkuThis will return the correct Product association that is being used on the Sku.This is the sum total of the priceAdjustments from the associated ProductOptionValuesDeprecated.Gets the ProductOptionValues used to map to this Sku.Returns the ProductOptionValues that should be mapped to this Sku using the middle XREF entity,SkuProductOptionValueXrefUsed in conjuction withInventoryType.CHECK_QUANTITYwithin the blAddItemWorkflow and blUpdateItemWorkflow.Returns the Retail Price of the Sku.protected MoneyReturns the Sale Price of the Sku.Deprecated.Deprecated.Returns a map of key/value pairs where the key is a string for the name of a media object and the value is a cross-reference to a media object.Returns a map of key/value pairs where the key is a string for the name of a media object and the value is a cross-reference to a media object.Convenience that passes through to isTaxableReturns the Tax Code for this particular Entity.getUpc()Gets the Universal Product Code (UPC)Returns the sku specific portion of a full url used for a sku info page.Gets the embedded Weight for this Skuprotected booleaninthashCode()booleanProvides a way of determining if a Sku has a retail price without getting an IllegalStateException.booleanDetermines if there is a sale price.booleanisActive()Returns a boolean indicating whether this sku is active.booleanReturns whether or not this Sku, the given Product and the given Category are all activeAvailability is really a concern of inventory vs a concern of the Sku being active or not.Returns whether the Sku qualifies for discounts or not.Deprecated.booleanisOnSale()A product is on sale provided the sale price is not null, non-zero, and less than the retail price.protected booleanisOrderedSkuMedia(Map<String, SkuMediaXref> skuMedia) Returns whether the Sku qualifies for taxes or not.protected SkuvoidsetActiveEndDate(Date activeEndDate) Sets the the last date that the Sku should be available for sale.voidsetActiveStartDate(Date activeStartDate) Sets the the first date that the Sku should be available for sale.voidsetAvailable(Boolean available) Availability is really a concern of inventory vs a concern of the Sku being active or not.voidSets the purchase cost for this Sku.voidsetCurrency(BroadleafCurrency currency) Sets the currency for this SkuvoidsetDefaultProduct(Product defaultProduct) The relationship for a Product's default Sku (and thus a Sku's default Product) is actually maintained on the Product entity as a foreign key to Sku.voidsetDescription(String description) Sets the brief description of the Sku.voidsetDimension(Dimension dimension) Sets the embedded Dimension for this SkuvoidsetDiscountable(Boolean discountable) Sets the whether the Sku qualifies for discounts or not.voidsetDisplayTemplate(String displayTemplate) Sets the name of a display template that is used to render this sku.voidsetExcludedFulfillmentOptions(List<FulfillmentOption> excludedFulfillmentOptions) Sets theFulfillmentOptions that this Sku should be excluded from being apart ofvoidsetExternalId(String externalId) Sets a unique external IDvoidSets the extra fees for this particular SkuvoidsetFulfillmentFlatRates(Map<FulfillmentOption, BigDecimal> fulfillmentFlatRates) Sets the flat rates for fulfilling thisSkufor a particularFulfillmentOption.voidsetFulfillmentType(FulfillmentType fulfillmentType) Sets the fulfillment type for this sku.voidSets the id of this skuvoidsetInventoryType(InventoryType inventoryType) Sets the type of inventory for this skuvoidsetIsMachineSortable(Boolean isMachineSortable) Sets whether or not this Sku can be sorted by a machinevoidsetListPrice(Money listPrice) Deprecated.voidsetLongDescription(String longDescription) Sets the long description of the sku.voidsetMachineSortable(Boolean isMachineSortable) Deprecated.voidSets the the name of the Sku.voidsetProduct(Product product) Associates a Sku to a given Product.voidsetProductOptionValues(List<ProductOptionValue> productOptionValues) Deprecated.voidsetProductOptionValuesCollection(Set<ProductOptionValue> productOptionValues) Sets the ProductOptionValues that should be mapped to this SkuvoidsetProductOptionValueXrefs(Set<SkuProductOptionValueXref> productOptionValueXrefs) Sets the ProductOptionValues that should be mapped to this Sku using the middle XREF entity,SkuProductOptionValueXrefvoidsetQuantityAvailable(Integer quantityAvailable) Used in conjunction withInventoryType.CHECK_QUANTITYfromSku.getInventoryType().voidsetRetailPrice(Money retailPrice) Sets the retail price for the Sku.voidsetSalePrice(Money salePrice) Sets the the Sale Price of the Sku.voidsetSkuAttributes(Map<String, SkuAttribute> skuAttributes) Sets the denormalized set of key-value pairs on a SkuvoidsetSkuMedia(Map<String, Media> skuMedia) Deprecated.voidsetSkuMediaXref(Map<String, SkuMediaXref> skuMediaXref) Sets a map of key/value pairs where the key is a string for the name of a media object and the value is a cross-reference object to type Media.voidsetTaxable(Boolean taxable) Sets the whether the Sku qualifies for taxes or not.voidsetTaxCode(String taxCode) Sets the tax code for this SKUvoidSets the Universal Product Code (UPC)voidSets the sku specific portion of a full url used for a sku info page.voidSets the embedded Weight for this Skuprotected Map<String,SkuMediaXref> sortSkuMedia(Map<String, SkuMediaXref> skuMedia)
-
Field Details
-
id
-
externalId
-
urlKey
-
displayTemplate
-
upc
-
salePrice
-
retailPrice
-
cost
-
name
-
description
-
longDescription
-
taxCode
-
taxable
-
discountable
-
available
Deprecated. -
activeStartDate
-
activeEndDate
-
dimension
-
weight
-
isMachineSortable
-
skuMedia
-
legacySkuMedia
-
defaultProduct
This will be non-null if and only if this Sku is the default Sku for a Product -
product
This relationship will be non-null if and only if this Sku is contained in the list of additional Skus for a Product (for Skus based on ProductOptions) -
skuAttributes
-
productOptionValueXrefs
-
legacyProductOptionValues
-
fees
-
fulfillmentFlatRates
-
excludedFulfillmentOptions
-
inventoryType
-
quantityAvailable
-
fulfillmentType
-
currency
Note that this field is not the target of the currencyCodeField attribute on either retailPrice or salePrice. This is because SKUs are special in that we want to return the currency on this SKU if there is one, falling back to the defaultSku's currency if possible.Normally null and hidden. Use Meta-Data overrides to display in the admin.
-
-
Constructor Details
-
SkuImpl
public SkuImpl()
-
-
Method Details
-
getId
Description copied from interface:SkuReturns the id of this sku -
setId
Description copied from interface:SkuSets the id of this sku -
getUrlKey
Description copied from interface:SkuReturns the sku specific portion of a full url used for a sku info page. -
setUrlKey
Description copied from interface:SkuSets the sku specific portion of a full url used for a sku info page. -
getDisplayTemplate
Description copied from interface:SkuReturns the name of a display template that is used to render this sku. Most implementations have a default template for all skus. This allows for the user to define a specific template to be used by this sku.- Specified by:
getDisplayTemplatein interfaceSku- Returns:
-
setDisplayTemplate
Description copied from interface:SkuSets the name of a display template that is used to render this sku. Most implementations have a default template for all skus. This allows for the user to define a specific template to be used by this sku.- Specified by:
setDisplayTemplatein interfaceSku
-
isOnSale
public boolean isOnSale()Description copied from interface:SkuA product is on sale provided the sale price is not null, non-zero, and less than the retail price.Note that this flag should always be checked before showing or using a sale price as it is possible for a sale price to be greater than the retail price from a purely data perspective.
-
hasDefaultSku
protected boolean hasDefaultSku() -
lookupDefaultSku
-
getProductOptionValueAdjustments
Description copied from interface:SkuThis is the sum total of the priceAdjustments from the associated ProductOptionValues- Specified by:
getProductOptionValueAdjustmentsin interfaceSku- Returns:
- null if there are no ProductOptionValues associated with this Sku or all of their priceAdjustments are null. Otherwise this will be the sum total of those price adjustments
-
getSalePrice
Description copied from interface:SkuReturns the Sale Price of the Sku. The Sale Price is the standard price the vendor sells this item for. IfSkuPricingConsiderationContextis set, this uses the DynamicSkuPricingService to calculate what this should actually be rather than use the property itself- Specified by:
getSalePricein interfaceSku
-
setSalePrice
Description copied from interface:SkuSets the the Sale Price of the Sku. The Sale Price is the standard price the vendor sells this item for. This price will automatically be overridden if your system is utilizing the DynamicSkuPricingService.- Specified by:
setSalePricein interfaceSku
-
hasSalePrice
public boolean hasSalePrice()Description copied from interface:SkuDetermines if there is a sale price. In other words, determines whether salePrice is null. Returns true if salePrice is not null. Returns false otherwise.- Specified by:
hasSalePricein interfaceSku- Returns:
-
getRetailPrice
Description copied from interface:SkuReturns the Retail Price of the Sku. The Retail Price is the MSRP of the sku. IfSkuPricingConsiderationContextis set, this uses the DynamicSkuPricingService to calculate what this should actually be rather than use the property itself.- Specified by:
getRetailPricein interfaceSku
-
setRetailPrice
Description copied from interface:SkuSets the retail price for the Sku. This price will automatically be overridden if your system is utilizing the DynamicSkuPricingService.- Specified by:
setRetailPricein interfaceSku- Parameters:
retailPrice- price for the Sku
-
getRetailPriceInternal
-
getBaseRetailPrice
Description copied from interface:SkuReturns the basic retail price of the Sku. This price does not include any dynamic pricing, including PriceList modification.- Specified by:
getBaseRetailPricein interfaceSku- Returns:
-
getBaseSalePrice
Description copied from interface:SkuReturns the basic sale price of the Sku. This price does not include any dynamic pricing, including PriceList modification.- Specified by:
getBaseSalePricein interfaceSku- Returns:
-
getPriceData
Description copied from interface:SkuIf a DynamicPricingService is being used, this method will return the dynamic Sku prices. Otherwise, it will return an instance of DynamicSkuPrices with the retail and sale price from the underlying record.- Specified by:
getPriceDatain interfaceSku- Returns:
-
hasRetailPrice
public boolean hasRetailPrice()Description copied from interface:SkuProvides a way of determining if a Sku has a retail price without getting an IllegalStateException. Returns true if retailPrice is not null. Returns false otherwise.- Specified by:
hasRetailPricein interfaceSku- Returns:
- See Also:
-
getPrice
Description copied from interface:SkuResolves the price of the Sku. If the Sku is on sale (that is, isOnSale() returns true), the return value will be the result of getSalePrice(). Otherwise, the return value will be the result of getRetailPrice(). -
getListPrice
Deprecated.Description copied from interface:SkuReturns the List Price of the Sku. The List Price is the MSRP of the sku.- Specified by:
getListPricein interfaceSku
-
setListPrice
Deprecated.Description copied from interface:SkuSets the the List Price of the Sku. The List Price is the MSRP of the sku.- Specified by:
setListPricein interfaceSku
-
getCost
Description copied from interface:SkuReturns the purchase cost of this Sku. -
setCost
Description copied from interface:SkuSets the purchase cost for this Sku. -
getMargin
Description copied from interface:SkuReturns the margin of the Sku. This is the value of getPrice() - getCost() -
getName
Description copied from interface:SkuReturns the name of the Sku. The name is a label used to show when displaying the sku. -
setName
Description copied from interface:SkuSets the the name of the Sku. The name is a label used to show when displaying the sku. -
getDescription
Description copied from interface:SkuReturns the brief description of the Sku.- Specified by:
getDescriptionin interfaceSku
-
setDescription
Description copied from interface:SkuSets the brief description of the Sku.- Specified by:
setDescriptionin interfaceSku
-
getLongDescription
Description copied from interface:SkuReturns the long description of the sku.- Specified by:
getLongDescriptionin interfaceSku
-
setLongDescription
Description copied from interface:SkuSets the long description of the sku.- Specified by:
setLongDescriptionin interfaceSku
-
isTaxable
Description copied from interface:SkuReturns whether the Sku qualifies for taxes or not. This field is used by the pricing engine to calculate taxes. -
getTaxable
Description copied from interface:SkuConvenience that passes through to isTaxable- Specified by:
getTaxablein interfaceSku
-
setTaxable
Description copied from interface:SkuSets the whether the Sku qualifies for taxes or not. This field is used by the pricing engine to calculate taxes.- Specified by:
setTaxablein interfaceSku
-
isDiscountable
Description copied from interface:SkuReturns whether the Sku qualifies for discounts or not. This field is used by the pricing engine to apply offers.- Specified by:
isDiscountablein interfaceSku
-
getDiscountable
-
setDiscountable
Description copied from interface:SkuSets the whether the Sku qualifies for discounts or not. This field is used by the pricing engine to apply offers.- Specified by:
setDiscountablein interfaceSku
-
isAvailable
Description copied from interface:SkuAvailability is really a concern of inventory vs a concern of the Sku being active or not. A Sku could be marked as unavailable but still be considered 'active' where you still want to show the Sku on the site but not actually sell it. This defaults to true
This method only checks that this Sku is not marked as
InventoryType.UNAVAILABLE. IfSku.getInventoryType()is set toInventoryType.CHECK_QUANTITYthen this will return true.- Specified by:
isAvailablein interfaceSku
-
getAvailable
Description copied from interface:SkuConvenience that passes through to isAvailable- Specified by:
getAvailablein interfaceSku
-
setAvailable
Description copied from interface:SkuAvailability is really a concern of inventory vs a concern of the Sku being active or not. A Sku could be marked as unavailable but still be considered 'active' where you still want to show the Sku on the site but not actually sell it. This defaults to true- Specified by:
setAvailablein interfaceSku
-
getActiveStartDate
Description copied from interface:SkuReturns the first date that the Sku should be available for sale. This field is used to determine whether a user can add the sku to their cart.- Specified by:
getActiveStartDatein interfaceSku
-
setActiveStartDate
Description copied from interface:SkuSets the the first date that the Sku should be available for sale. This field is used to determine whether a user can add the sku to their cart.- Specified by:
setActiveStartDatein interfaceSku
-
getActiveEndDate
Description copied from interface:SkuReturns the the last date that the Sku should be available for sale. This field is used to determine whether a user can add the sku to their cart.- Specified by:
getActiveEndDatein interfaceSku
-
setActiveEndDate
Description copied from interface:SkuSets the the last date that the Sku should be available for sale. This field is used to determine whether a user can add the sku to their cart.- Specified by:
setActiveEndDatein interfaceSku
-
getDimension
Description copied from interface:SkuGet the dimensions for this Sku- Specified by:
getDimensionin interfaceSku- Returns:
- this Sku's embedded Weight
-
setDimension
Description copied from interface:SkuSets the embedded Dimension for this Sku- Specified by:
setDimensionin interfaceSku
-
getWeight
Description copied from interface:SkuGets the embedded Weight for this Sku -
setWeight
Description copied from interface:SkuSets the embedded Weight for this Sku -
isActive
public boolean isActive()Description copied from interface:SkuReturns a boolean indicating whether this sku is active. This is used to determine whether a user the sku can add the sku to their cart. -
isActive
Description copied from interface:SkuReturns whether or not this Sku, the given Product and the given Category are all active -
getSkuMedia
Deprecated.Description copied from interface:SkuReturns a map of key/value pairs where the key is a string for the name of a media object and the value is a media object.- Specified by:
getSkuMediain interfaceSku
-
setSkuMedia
Deprecated.Description copied from interface:SkuSets a map of key/value pairs where the key is a string for the name of a media object and the value is an object of type Media.- Specified by:
setSkuMediain interfaceSku
-
getSkuMediaXref
Description copied from interface:SkuReturns a map of key/value pairs where the key is a string for the name of a media object and the value is a cross-reference to a media object.- Specified by:
getSkuMediaXrefin interfaceSku
-
setSkuMediaXref
Description copied from interface:SkuSets a map of key/value pairs where the key is a string for the name of a media object and the value is a cross-reference object to type Media.- Specified by:
setSkuMediaXrefin interfaceSku
-
getSkuMediaXrefIgnoreDefaultSku
Description copied from interface:SkuReturns a map of key/value pairs where the key is a string for the name of a media object and the value is a cross-reference to a media object. This is intended to be used when cloning Skus and does not check the defaultSku unlikeSku.getSkuMediaXref().- Specified by:
getSkuMediaXrefIgnoreDefaultSkuin interfaceSku
-
getPrimarySkuMedia
Description copied from interface:SkuReturns the primaryMediafor this Sku- Specified by:
getPrimarySkuMediain interfaceSku
-
isOrderedSkuMedia
-
sortSkuMedia
-
getDefaultProduct
Description copied from interface:SkuThis will be a value if and only if this Sku is the defaultSku of a Product (and thus has a @OneToOne relationship with a Product). The mapping for this is actually done at the Product level with a foreign key to Sku; this exists for convenience to get the reverse relationship- Specified by:
getDefaultProductin interfaceSku- Returns:
- The associated Product if this Sku is a defaultSku, null otherwise
- See Also:
-
setDefaultProduct
Description copied from interface:SkuThe relationship for a Product's default Sku (and thus a Sku's default Product) is actually maintained on the Product entity as a foreign key to Sku. Because of this, there are probably very few circumstances that you would actually want to change this from the Sku perspective instead of the Product perspective.
If you are looking for a way to simply associate a Sku to a Product, the correct way would be to callSku.setProduct(Product)orProduct.setAdditionalSkus(List)which would then cause this Sku to show up in the list of Skus for the given Product- Specified by:
setDefaultProductin interfaceSku
-
getProduct
Description copied from interface:SkuThis will return the correct Product association that is being used on the Sku. If this Sku is a default Sku for a Product (as in,Sku.getDefaultProduct()!= null) than this will returnSku.getDefaultProduct(). If this is not a default Sku for a Product, this will return the @ManyToOne Product relationship created by adding this Sku to a Product's list of Skus, or usingSku.setProduct(Product).
In some implementations, it might make sense to have both the @OneToOne association set (Product.setDefaultSku(Sku)) as well as the @ManyToOne association set (Sku.setProduct(Product)). In this case, This method would only return the result ofSku.getDefaultProduct(). However, the @OneToOne and @ManyToOne association should never actually refer to different Products, and would represent an error state. If you require this, consider subclassing and using your own @ManyToMany relationship between Product and Sku. If you are trying to model bundles, consider using aProductBundleand subsequentSkuBundleItems.- Specified by:
getProductin interfaceSku- Returns:
Sku.getDefaultProduct()ifSku.getDefaultProduct()is non-null, the @ManyToOne Product association otherwise. If no relationship is set, returns null
-
setProduct
Description copied from interface:SkuAssociates a Sku to a given Product. This will then show up in the list returned byProduct.getSkus()- Specified by:
setProductin interfaceSku- Parameters:
product- - Product to associate this Sku to- See Also:
-
getProductOptionValueXrefs
Description copied from interface:SkuReturns the ProductOptionValues that should be mapped to this Sku using the middle XREF entity,SkuProductOptionValueXref- Specified by:
getProductOptionValueXrefsin interfaceSku- Returns:
- the Set of
SkuProductOptionValueXrefs
-
setProductOptionValueXrefs
Description copied from interface:SkuSets the ProductOptionValues that should be mapped to this Sku using the middle XREF entity,SkuProductOptionValueXref- Specified by:
setProductOptionValueXrefsin interfaceSku
-
getProductOptionValuesCollection
Description copied from interface:SkuGets the ProductOptionValues used to map to this Sku. For instance, this Sku could hold specific inventory, price and image information for a "Blue" "Extra-Large" shirt- Specified by:
getProductOptionValuesCollectionin interfaceSku- Returns:
- the ProductOptionValues for this Sku
-
setProductOptionValuesCollection
Description copied from interface:SkuSets the ProductOptionValues that should be mapped to this Sku- Specified by:
setProductOptionValuesCollectionin interfaceSku
-
getProductOptionValues
Deprecated.Description copied from interface:SkuGets the ProductOptionValues used to map to this Sku. For instance, this Sku could hold specific inventory, price and image information for a "Blue" "Extra-Large" shirt- Specified by:
getProductOptionValuesin interfaceSku- Returns:
- the ProductOptionValues for this Sku
-
setProductOptionValues
Deprecated.Description copied from interface:SkuSets the ProductOptionValues that should be mapped to this Sku- Specified by:
setProductOptionValuesin interfaceSku
-
isMachineSortable
Deprecated.Description copied from interface:SkuWhether this Sku can be sorted by a machine- Specified by:
isMachineSortablein interfaceSku- Returns:
- true if this Sku can be sorted by a machine
-
getIsMachineSortable
Description copied from interface:SkuWhether this Sku can be sorted by a machine- Specified by:
getIsMachineSortablein interfaceSku
-
setIsMachineSortable
Description copied from interface:SkuSets whether or not this Sku can be sorted by a machine- Specified by:
setIsMachineSortablein interfaceSku
-
setMachineSortable
Deprecated.Description copied from interface:SkuSets whether or not this Sku can be sorted by a machine- Specified by:
setMachineSortablein interfaceSku
-
getFees
Description copied from interface:SkuGets all the extra fees for this particular Sku. If the fee type is FULFILLMENT, these are stored onFulfillmentGroup.getFulfillmentGroupFees()for an Order -
setFees
Description copied from interface:SkuSets the extra fees for this particular Sku -
getFulfillmentFlatRates
Description copied from interface:SkuGets the flat rate for fulfilling thisSkufor a particularFulfillmentOption. Depending on the result ofFulfillmentOption.getUseFlatRates(), this flat rate will be used in calculating the cost of fulfilling thisSku.- Specified by:
getFulfillmentFlatRatesin interfaceSku- Returns:
- the flat rates for this
Sku
-
setFulfillmentFlatRates
Description copied from interface:SkuSets the flat rates for fulfilling thisSkufor a particularFulfillmentOption. Depending on the result ofFulfillmentOption.getUseFlatRates(), this flat rate will be used in calculating the cost of fulfilling thisSku.- Specified by:
setFulfillmentFlatRatesin interfaceSku
-
getExcludedFulfillmentOptions
Description copied from interface:SkuGets theFulfillmentOptions that thisSkushould be excluded from. For instance, someSkus might not be available to be fulfilled next-day- Specified by:
getExcludedFulfillmentOptionsin interfaceSku- Returns:
-
setExcludedFulfillmentOptions
Description copied from interface:SkuSets theFulfillmentOptions that this Sku should be excluded from being apart of- Specified by:
setExcludedFulfillmentOptionsin interfaceSku
-
getInventoryType
Description copied from interface:SkuReturns the type of inventory for this sku- Specified by:
getInventoryTypein interfaceSku- Returns:
- the
InventoryTypefor this sku
-
setInventoryType
Description copied from interface:SkuSets the type of inventory for this sku- Specified by:
setInventoryTypein interfaceSku- Parameters:
inventoryType- theInventoryTypefor this sku
-
getQuantityAvailable
Description copied from interface:SkuUsed in conjuction with
InventoryType.CHECK_QUANTITYwithin the blAddItemWorkflow and blUpdateItemWorkflow. This field is checked within theCheckAddAvailabilityActivityto determine if inventory is actually available for this Sku.- Specified by:
getQuantityAvailablein interfaceSku
-
setQuantityAvailable
Description copied from interface:SkuUsed in conjunction with
InventoryType.CHECK_QUANTITYfromSku.getInventoryType(). This sets how much inventory is available for this Sku.- Specified by:
setQuantityAvailablein interfaceSku- Parameters:
quantityAvailable- the quantity available for this sku
-
getFulfillmentType
Description copied from interface:SkuReturns the fulfillment type for this sku. May be null.- Specified by:
getFulfillmentTypein interfaceSku- Returns:
-
setFulfillmentType
Description copied from interface:SkuSets the fulfillment type for this sku. May return null.- Specified by:
setFulfillmentTypein interfaceSku
-
getSkuAttributes
Deprecated.Description copied from interface:SkuDenormalized set of key-value pairs to attach to a Sku. If you are looking for setting up aProductOptionscenario (like colors, sizes, etc) seeSku.getProductOptionValues()andSku.setProductOptionValues(List)- Specified by:
getSkuAttributesin interfaceSku- Returns:
- the attributes for this Sku
-
setSkuAttributes
Description copied from interface:SkuSets the denormalized set of key-value pairs on a Sku- Specified by:
setSkuAttributesin interfaceSku
-
getMultiValueSkuAttributes
Description copied from interface:SkuReturns multivalued SkuAttributes associated with this sku usingMultiValueMap. For example, the key of Color could have SkuAttributes of Red and Blue values.- Specified by:
getMultiValueSkuAttributesin interfaceSku- Returns:
- the multivalued attributes for this Sku
-
getCurrency
Description copied from interface:SkuNote: When using dynamic pricing, this method is unreliable and should not be called outside of the Broadleaf admin Instead, you should rely on theBroadleafRequestContext.getBroadleafCurrency()instead of storing at the SKU level.As such, for supported, enterprise installations, this method should always return null.
This method was not deprecated as it may have some use in non-standard Broadleaf installations but using its use is not suggested for most implementations.
- Specified by:
getCurrencyin interfaceSku- Returns:
- the currency for this sku
-
setCurrency
Description copied from interface:SkuSets the currency for this SkuNote: Currency is ignored when using dynamic pricing
- Specified by:
setCurrencyin interfaceSku
-
clearDynamicPrices
public void clearDynamicPrices()Description copied from interface:SkuClears any currently stored dynamic pricing- Specified by:
clearDynamicPricesin interfaceSku
-
equals
-
hashCode
public int hashCode() -
getTaxCode
Description copied from interface:SkuReturns the Tax Code for this particular Entity.If the current Tax Code on the Sku is null, the Product tax code will be returned.
- Specified by:
getTaxCodein interfaceSku- Returns:
- taxCode
-
setTaxCode
Description copied from interface:SkuSets the tax code for this SKU- Specified by:
setTaxCodein interfaceSku
-
getExternalId
Description copied from interface:SkuIntended to hold any unique identifier not tied to the Broadleaf Database Sequence Identifier. For example, many implementations may integrate or import/export data from other systems that manage their own unique identifiers.- Specified by:
getExternalIdin interfaceSku- Returns:
- external ID
-
setExternalId
Description copied from interface:SkuSets a unique external ID- Specified by:
setExternalIdin interfaceSku
-
getUpc
Description copied from interface:SkuGets the Universal Product Code (UPC) -
setUpc
Description copied from interface:SkuSets the Universal Product Code (UPC) -
getFieldEntityType
Description copied from interface:IndexableWhich type ofFieldshould be queried for when looking up database-driven search fields to store in the search index -
createOrRetrieveCopyInstance
public <G extends Sku> CreateResponse<G> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException - Specified by:
createOrRetrieveCopyInstancein interfaceMultiTenantCloneable<Sku>- Throws:
CloneNotSupportedException
-