com.elasticpath.service.dataimport.impl
Class ImportGuidHelperImpl

java.lang.Object
  extended by com.elasticpath.service.impl.AbstractEpServiceImpl
      extended by com.elasticpath.service.impl.AbstractEpPersistenceServiceImpl
          extended by com.elasticpath.service.dataimport.impl.ImportGuidHelperImpl
All Implemented Interfaces:
ImportGuidHelper, EpPersistenceService, EpService

public class ImportGuidHelperImpl
extends AbstractEpPersistenceServiceImpl
implements ImportGuidHelper

This helper service provides the ability to load various entity by the given guid.


Constructor Summary
ImportGuidHelperImpl()
           
 
Method Summary
 Brand findBrandByGuid(java.lang.String guid)
          Retrieve the brand with the given guid.
 Category findCategoryByGuid(java.lang.String guid, boolean flagLoadProducts, boolean flagLoadAttributes, boolean flagLoadChildren)
          Retrieve the category with the given guid.
 Customer findCustomerByGuid(java.lang.String guid)
          Retrieve the customer with the given guid.
 Product findProductByGuid(java.lang.String guid, boolean flagLoadCategories, boolean flagLoadAttributes)
          Retrieve the product with the given guid.
 ProductSku findProductSkuByGuid(java.lang.String guid)
          Retrieve the product sku with the given guid.
 CategoryService getCategoryService()
          Returns the imbedded category service.
 java.lang.Object getObject(long uid)
          Not used.
 ProductService getProductService()
          Returns the imbedded product service.
 boolean isBrandGuidExist(java.lang.String guid)
          Return true if the given brand guid exist.
 boolean isCategoryGuidExist(java.lang.String guid)
          Return true if the given category guid exist.
 boolean isCustomerGuidExist(java.lang.String guid)
          Return true if the given Customer guid exists.
 boolean isProductGuidExist(java.lang.String guid)
          Return true if the given product guid exist.
 boolean isProductSkuGuidExist(java.lang.String guid)
          Return true if the given productsku guid exist.
 void setCategoryService(CategoryService categoryService)
          Set the category service.
 void setFetchSize(int fetchSize)
          Set the fetch size.
 void setMaxResults(int maxResults)
          Set the max return results.
 void setProductService(ProductService productService)
          Set the product service.
 void setSession(PersistenceSession session)
          Set the session.
 
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

ImportGuidHelperImpl

public ImportGuidHelperImpl()
Method Detail

findBrandByGuid

public Brand findBrandByGuid(java.lang.String guid)
                      throws EpServiceException
Retrieve the brand with the given guid.

Specified by:
findBrandByGuid in interface ImportGuidHelper
Parameters:
guid - the guid of the brand
Returns:
the brand with the given guid
Throws:
EpServiceException - in case of any error

findCategoryByGuid

public Category findCategoryByGuid(java.lang.String guid,
                                   boolean flagLoadProducts,
                                   boolean flagLoadAttributes,
                                   boolean flagLoadChildren)
                            throws EpServiceException
Retrieve the category with the given guid.

Specified by:
findCategoryByGuid in interface ImportGuidHelper
Parameters:
guid - the guid of the category
flagLoadProducts - set it to true to load products
flagLoadAttributes - set it to true to load attributes values
flagLoadChildren - set it to true to load children of the category
Returns:
the category with the given guid
Throws:
EpServiceException - in case of any error

findCustomerByGuid

public Customer findCustomerByGuid(java.lang.String guid)
                            throws EpServiceException
Retrieve the customer with the given guid.

Specified by:
findCustomerByGuid in interface ImportGuidHelper
Parameters:
guid - the guid of the Customer
Returns:
the Customer with the given guid
Throws:
EpServiceException - in case of any error

findProductByGuid

public Product findProductByGuid(java.lang.String guid,
                                 boolean flagLoadCategories,
                                 boolean flagLoadAttributes)
                          throws EpServiceException
Retrieve the product with the given guid.

Specified by:
findProductByGuid in interface ImportGuidHelper
Parameters:
guid - the guid of the product
flagLoadCategories - set it to true to load categories
flagLoadAttributes - set it to true to load attributes values
Returns:
the product with the given guid
Throws:
EpServiceException - in case of any error

findProductSkuByGuid

public ProductSku findProductSkuByGuid(java.lang.String guid)
                                throws EpServiceException
Retrieve the product sku with the given guid.

Specified by:
findProductSkuByGuid in interface ImportGuidHelper
Parameters:
guid - the guid of the product sku
Returns:
the product sku with the given guid
Throws:
EpServiceException - in case of any error

getCategoryService

public CategoryService getCategoryService()
Returns the imbedded category service.

Returns:
the imbedded category service

getObject

public java.lang.Object getObject(long uid)
                           throws EpServiceException
Not used.

Specified by:
getObject in interface EpPersistenceService
Parameters:
uid - not used.
Returns:
nothing.
Throws:
EpServiceException - - in case of called

getProductService

public ProductService getProductService()
Returns the imbedded product service.

Returns:
the imbedded product service

isBrandGuidExist

public boolean isBrandGuidExist(java.lang.String guid)
Return true if the given brand guid exist.

Specified by:
isBrandGuidExist in interface ImportGuidHelper
Parameters:
guid - the guid of the brand
Returns:
true if the given brand guid exist
Throws:
EpServiceException - in case of any error

isCategoryGuidExist

public boolean isCategoryGuidExist(java.lang.String guid)
                            throws EpServiceException
Return true if the given category guid exist.

Specified by:
isCategoryGuidExist in interface ImportGuidHelper
Parameters:
guid - the guid of the category
Returns:
true if the given category guid exist
Throws:
EpServiceException - in case of any error

isCustomerGuidExist

public boolean isCustomerGuidExist(java.lang.String guid)
                            throws EpServiceException
Return true if the given Customer guid exists.

Specified by:
isCustomerGuidExist in interface ImportGuidHelper
Parameters:
guid - the guid of the Customer
Returns:
true if the given Customer guid exists
Throws:
EpServiceException - in case of any error

isProductGuidExist

public boolean isProductGuidExist(java.lang.String guid)
                           throws EpServiceException
Return true if the given product guid exist.

Specified by:
isProductGuidExist in interface ImportGuidHelper
Parameters:
guid - the guid of the product
Returns:
true if the given product guid exist
Throws:
EpServiceException - in case of any error

isProductSkuGuidExist

public boolean isProductSkuGuidExist(java.lang.String guid)
                              throws EpServiceException
Return true if the given productsku guid exist.

Specified by:
isProductSkuGuidExist in interface ImportGuidHelper
Parameters:
guid - the guid of the productsku
Returns:
true if the given productsku guid exist
Throws:
EpServiceException - in case of any error

setCategoryService

public void setCategoryService(CategoryService categoryService)
Set the category service.

Parameters:
categoryService - the category service to set

setFetchSize

public void setFetchSize(int fetchSize)
Set the fetch size.

Parameters:
fetchSize - the fetch size

setMaxResults

public void setMaxResults(int maxResults)
Set the max return results.

Parameters:
maxResults - the max return results

setProductService

public void setProductService(ProductService productService)
Set the product service.

Parameters:
productService - the product service to set

setSession

public void setSession(PersistenceSession session)
Set the session.

Specified by:
setSession in interface ImportGuidHelper
Parameters:
session - the session to set