|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.elasticpath.service.impl.AbstractEpServiceImpl com.elasticpath.service.impl.AbstractEpPersistenceServiceImpl com.elasticpath.service.catalog.impl.ProductSkuServiceImpl
public class ProductSkuServiceImpl
The default implementation of ProductSkuService
.
Constructor Summary | |
---|---|
ProductSkuServiceImpl()
|
Method Summary | |
---|---|
ProductSku |
add(ProductSku productSku)
Adds the given product sku. |
java.util.List |
findByProductUid(long productUid)
Returns a list of ProductSku based on the given product Uid. |
ProductSku |
findBySkuCode(java.lang.String skuCode)
Finds a ProductSku by its SKU Code. |
ProductSku |
findBySkuCodeWithAll(java.lang.String skuCode)
Finds a ProductSku by its SKU Code and populates all lazy-loaded references. |
java.util.List |
findProductSkuCodeLikeWithRestriction(java.lang.String criteriaValue,
long parentCategoryUid)
Retrieve the list of productSkus, whose name matches the given criteria and belongs to direct or indirect subcategory of the specified parent category. |
java.util.List |
findProductSkuLike(java.lang.String propertyName,
java.lang.String criteriaValue)
Retrieve the list of productSkus, whose specified property contain the given criteria value. |
long |
findUidBySkuCode(java.lang.String skuCode)
Get the sku UID of the given sku identifier. |
ProductSku |
get(long productSkuUid)
Get the productSku with the given UID. |
java.lang.Object |
getObject(long uid)
Generic get method for all persistable domain models. |
Utility |
getUtility()
Returns the utility instance. |
ProductSku |
getWithProduct(long productSkuUid)
Get the productSku with the given UID and load the parent product as well. |
ProductSku |
getWithPromotions(long productSkuUid,
ShoppingCart shoppingCart)
Get the productSku with the given UID. |
void |
removeProductSkuTree(long productSkuUid)
Deletes the product sku and all it associations. |
void |
saveOrUpdate(ProductSku sku)
Save or update the given product sku. |
void |
setCategoryService(CategoryService categoryService)
Set the CategoryService singleton. |
void |
setLazyLoadHelper(LazyLoadHelper lazyLoadHelper)
Sets the lazy load helper. |
void |
setProductLoadTunerAll(ProductLoadTuner productLoadTunerAll)
Sets the ProductLoadTuner for populating all data. |
void |
setProductService(ProductService productService)
Set the product service. |
void |
setProductSkuLoadTunerAll(ProductSkuLoadTuner productSkuLoadTunerAll)
Sets the ProductSkuLoadTuner for populating all data. |
void |
setProductSkuLoadTunerMinimal(ProductSkuLoadTuner productSkuLoadTunerMinimal)
Sets the ProductSkuLoadTuner to populate the SkuOptionValue s. |
void |
setRuleEngine(EpRuleEngine epRuleEngine)
Sets the rule engine. |
void |
setUtility(Utility utility)
Sets the utility. |
Methods inherited from class com.elasticpath.service.impl.AbstractEpPersistenceServiceImpl |
---|
getPersistenceEngine, setPersistenceEngine |
Methods inherited from class com.elasticpath.service.impl.AbstractEpServiceImpl |
---|
getElasticPath, setElasticPath |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.elasticpath.service.EpPersistenceService |
---|
getPersistenceEngine, setPersistenceEngine |
Methods inherited from interface com.elasticpath.service.EpService |
---|
getElasticPath, setElasticPath |
Constructor Detail |
---|
public ProductSkuServiceImpl()
Method Detail |
---|
public ProductSku add(ProductSku productSku) throws EpServiceException
add
in interface ProductSkuService
productSku
- the product sku to add
EpServiceException
- - in case of any errorspublic java.util.List findByProductUid(long productUid)
ProductSku
based on the given product Uid.
findByProductUid
in interface ProductSkuService
productUid
- the product Uid
ProductSku
public ProductSku findBySkuCode(java.lang.String skuCode)
ProductSku
by its SKU Code.
findBySkuCode
in interface ProductSkuService
skuCode
- the sku code
ProductSku
or null if no matching SKU is foundpublic ProductSku findBySkuCodeWithAll(java.lang.String skuCode)
ProductSku
by its SKU Code and populates all lazy-loaded references.
findBySkuCodeWithAll
in interface ProductSkuService
skuCode
- the sku code
ProductSku
or null if no matching SKU is foundpublic java.util.List findProductSkuCodeLikeWithRestriction(java.lang.String criteriaValue, long parentCategoryUid) throws EpServiceException
findProductSkuCodeLikeWithRestriction
in interface ProductSkuService
criteriaValue
- criteria value to be used for searching.parentCategoryUid
- Parent Category used to restricted the search results.
EpServiceException
- in case of any errorpublic java.util.List findProductSkuLike(java.lang.String propertyName, java.lang.String criteriaValue) throws EpServiceException
findProductSkuLike
in interface ProductSkuService
propertyName
- productSku property to search on.criteriaValue
- criteria value to be used for searching.
EpServiceException
- in case of any errorpublic long findUidBySkuCode(java.lang.String skuCode) throws EpServiceException
skuCode
- the SKU Code or Guid.
EpServiceException
- - in case of any errorspublic ProductSku get(long productSkuUid) throws EpServiceException
get
in interface ProductSkuService
productSkuUid
- the ProductSku UID.
EpServiceException
- - in case of any errorspublic java.lang.Object getObject(long uid) throws EpServiceException
getObject
in interface ProductSkuService
getObject
in interface EpPersistenceService
uid
- the persisted instance uid
EpServiceException
- - in case of any errorspublic Utility getUtility()
public ProductSku getWithProduct(long productSkuUid) throws EpServiceException
getWithProduct
in interface ProductSkuService
productSkuUid
- the ProductSku UID.
EpServiceException
- - in case of any errorspublic ProductSku getWithPromotions(long productSkuUid, ShoppingCart shoppingCart) throws EpServiceException
getWithPromotions
in interface ProductSkuService
productSkuUid
- the ProductSku UID.shoppingCart
- pass in the shopping cart to apply promotion rules
EpServiceException
- - in case of any errorspublic void removeProductSkuTree(long productSkuUid) throws EpServiceException
removeProductSkuTree
in interface ProductSkuService
productSkuUid
- the uid of product sku to remove
EpServiceException
- in case of any errorspublic void saveOrUpdate(ProductSku sku) throws DuplicateKeyException
saveOrUpdate
in interface ProductSkuService
sku
- the product sku to save or update
DuplicateKeyException
- - when sku code is duplicate in the dbpublic void setCategoryService(CategoryService categoryService)
CategoryService
singleton.
categoryService
- the CategoryService
singleton.public void setLazyLoadHelper(LazyLoadHelper lazyLoadHelper)
lazyLoadHelper
- the lazy load helper.public void setProductLoadTunerAll(ProductLoadTuner productLoadTunerAll)
ProductLoadTuner
for populating all data.
productLoadTunerAll
- the ProductLoadTuner
for populating all data.public void setProductService(ProductService productService)
productService
- the product servicepublic void setProductSkuLoadTunerAll(ProductSkuLoadTuner productSkuLoadTunerAll)
ProductSkuLoadTuner
for populating all data.
productSkuLoadTunerAll
- the ProductSkuLoadTuner
for populating all data.public void setProductSkuLoadTunerMinimal(ProductSkuLoadTuner productSkuLoadTunerMinimal)
ProductSkuLoadTuner
to populate the SkuOptionValue
s.
productSkuLoadTunerMinimal
- the ProductSkuLoadTuner
for populating only the SkuOptionValue
s.public void setRuleEngine(EpRuleEngine epRuleEngine)
epRuleEngine
- the rule enginepublic void setUtility(Utility utility)
utility
- the utility to set
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |