com.elasticpath.service.catalog.impl
Class InventoryServiceImpl

java.lang.Object
  extended by com.elasticpath.service.impl.AbstractEpServiceImpl
      extended by com.elasticpath.service.impl.AbstractEpPersistenceServiceImpl
          extended by com.elasticpath.service.catalog.impl.InventoryServiceImpl
All Implemented Interfaces:
InventoryService, EpPersistenceService, EpService

public class InventoryServiceImpl
extends AbstractEpPersistenceServiceImpl
implements InventoryService

Provides inventory-related services.


Constructor Summary
InventoryServiceImpl()
           
 
Method Summary
 Inventory get(long inventoryUid)
          Get the inventory with the given UID.
 java.lang.Object getObject(long uid)
          Generic get method for all persistable domain models.
 void saveOrUpdate(Inventory inventory)
          Save or update the given inventory item.
 void setProductSkuService(ProductSkuService skuService)
          Set method for the product sku service.
 void update(Inventory inventory)
          Save or update the given inventory item.
 void updateBySkuCode(java.lang.String skuCode, Inventory inventory)
          Save or update the given inventory item with the given skuCode.
 
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

InventoryServiceImpl

public InventoryServiceImpl()
Method Detail

get

public Inventory get(long inventoryUid)
              throws EpServiceException
Get the inventory with the given UID. Return null if no matching record exists.

Specified by:
get in interface InventoryService
Parameters:
inventoryUid - the order UID
Returns:
the inventory if UID exists, otherwise null
Throws:
EpServiceException - - in case of any errors

getObject

public java.lang.Object getObject(long uid)
                           throws EpServiceException
Generic get method for all persistable domain models.

Specified by:
getObject in interface EpPersistenceService
Parameters:
uid - the persisted instance uid
Returns:
the persisted instance if exists, otherwise null
Throws:
EpServiceException - - in case of any errors

saveOrUpdate

public void saveOrUpdate(Inventory inventory)
                  throws EpServiceException
Save or update the given inventory item.

Specified by:
saveOrUpdate in interface InventoryService
Parameters:
inventory - the inventory to save or update
Throws:
EpServiceException - - in case of any errors

setProductSkuService

public void setProductSkuService(ProductSkuService skuService)
Set method for the product sku service.

Parameters:
skuService - product sku service.

update

public void update(Inventory inventory)
            throws EpServiceException
Save or update the given inventory item.

Specified by:
update in interface InventoryService
Parameters:
inventory - the inventory to save or update
Throws:
EpServiceException - - in case of any errors

updateBySkuCode

public void updateBySkuCode(java.lang.String skuCode,
                            Inventory inventory)
                     throws EpServiceException
Save or update the given inventory item with the given skuCode.

Specified by:
updateBySkuCode in interface InventoryService
Parameters:
skuCode - the sku code of inventory to save or update
inventory - the inventory to save or update
Throws:
EpServiceException - - in case of any errors