net.sf.oness.inventory.model.facade
Class InventorySpringFacadeDelegate

java.lang.Object
  extended bynet.sf.oness.common.all.BaseObject
      extended bynet.sf.oness.inventory.model.facade.InventorySpringFacadeDelegate
All Implemented Interfaces:
java.lang.Cloneable, InventoryFacadeDelegate, java.io.Serializable

public class InventorySpringFacadeDelegate
extends net.sf.oness.common.all.BaseObject
implements InventoryFacadeDelegate

Version:
$Revision: 1.21 $
Author:
Carlos Sanchez
See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sf.oness.common.all.BaseObject
log
 
Constructor Summary
InventorySpringFacadeDelegate()
           
 
Method Summary
 Model createModel(Model model, java.lang.Long sizeGroupId, java.util.Collection colorIds)
          Create a model and a product for each size and color.
 void deleteModel(java.lang.Long id)
           
 Model editPrices(java.lang.Long modelId)
          Get a model for editing its prices
 Model findModel(java.lang.Long id)
          Find a model without its products nor sizes of its sizeGroup
 net.sf.oness.common.model.util.PaginatedList findModel(Model model, int firstElement, int maxElements)
          Find a model without products
 Model findModelWithDetails(java.lang.Long id)
          Find a model with all its products and sizes of its sizeGroup
 java.util.Map findProducts(java.util.Collection productIds)
          Find products by ids
 Product findProductWithDetails(java.lang.Long id)
          Find a product with all its stocks and prices
 java.util.List getAllColors()
          Get all colors
 java.util.List getAllFares()
          Get all fares
 java.util.List getAllSizeGroups()
          Get all size groups with its sizes
 java.util.List getAllWarehouses()
          Get all Warehouses
 net.sf.oness.common.model.dao.Dao getColorDao()
           
 net.sf.oness.common.model.dao.Dao getFareDao()
           
 net.sf.oness.common.model.dao.Dao getModelDao()
           
 net.sf.oness.common.model.dao.Dao getPriceDao()
           
 net.sf.oness.common.model.dao.Dao getProductDao()
           
 net.sf.oness.common.model.dao.Dao getSizeGroupDao()
           
 net.sf.oness.common.model.dao.Dao getStockDao()
           
 net.sf.oness.common.model.dao.Dao getWarehouseDao()
           
 void setColorDao(net.sf.oness.common.model.dao.Dao colorDao)
           
 void setFareDao(net.sf.oness.common.model.dao.Dao fareDao)
           
 void setModelDao(net.sf.oness.common.model.dao.Dao modelDao)
           
 void setPriceDao(net.sf.oness.common.model.dao.Dao priceDao)
           
 void setProductDao(net.sf.oness.common.model.dao.Dao productDao)
           
 void setSizeGroupDao(net.sf.oness.common.model.dao.Dao sizeGroupDao)
           
 void setStockDao(net.sf.oness.common.model.dao.Dao stockDao)
           
 void setWarehouseDao(net.sf.oness.common.model.dao.Dao warehouseDao)
           
 Model updateModel(Model model)
           
 Model updatePrices(java.util.Map productPrices)
          Update the prices for some products.
 
Methods inherited from class net.sf.oness.common.all.BaseObject
clone, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InventorySpringFacadeDelegate

public InventorySpringFacadeDelegate()
Method Detail

setModelDao

public void setModelDao(net.sf.oness.common.model.dao.Dao modelDao)
Parameters:
modelDao - The modelDao to set.

getModelDao

public net.sf.oness.common.model.dao.Dao getModelDao()
Returns:
Returns the modelDao.

setSizeGroupDao

public void setSizeGroupDao(net.sf.oness.common.model.dao.Dao sizeGroupDao)
Parameters:
sizeGroupDao - The sizeGroupDao to set.

getSizeGroupDao

public net.sf.oness.common.model.dao.Dao getSizeGroupDao()
Returns:
Returns the sizeGroupDao.

setColorDao

public void setColorDao(net.sf.oness.common.model.dao.Dao colorDao)
Parameters:
colorDao - The colorDao to set.

getColorDao

public net.sf.oness.common.model.dao.Dao getColorDao()
Returns:
Returns the colorDao.

setProductDao

public void setProductDao(net.sf.oness.common.model.dao.Dao productDao)
Parameters:
productDao - The productDao to set.

getProductDao

public net.sf.oness.common.model.dao.Dao getProductDao()
Returns:
Returns the productDao.

setStockDao

public void setStockDao(net.sf.oness.common.model.dao.Dao stockDao)
Parameters:
stockDao - The stockDao to set.

getStockDao

public net.sf.oness.common.model.dao.Dao getStockDao()
Returns:
Returns the stockDao.

setPriceDao

public void setPriceDao(net.sf.oness.common.model.dao.Dao priceDao)
Parameters:
priceDao - The priceDao to set.

getPriceDao

public net.sf.oness.common.model.dao.Dao getPriceDao()
Returns:
Returns the priceDao.

setWarehouseDao

public void setWarehouseDao(net.sf.oness.common.model.dao.Dao warehouseDao)
Parameters:
warehouseDao - The warehouseDao to set.

getWarehouseDao

public net.sf.oness.common.model.dao.Dao getWarehouseDao()
Returns:
Returns the warehouseDao.

setFareDao

public void setFareDao(net.sf.oness.common.model.dao.Dao fareDao)
Parameters:
fareDao - The fareDao to set.

getFareDao

public net.sf.oness.common.model.dao.Dao getFareDao()
Returns:
Returns the fareDao.

createModel

public Model createModel(Model model,
                         java.lang.Long sizeGroupId,
                         java.util.Collection colorIds)
Description copied from interface: InventoryFacadeDelegate
Create a model and a product for each size and color.

Specified by:
createModel in interface InventoryFacadeDelegate
Parameters:
model -
sizeGroupId -
colorIds -
Returns:
The model created

updateModel

public Model updateModel(Model model)
Specified by:
updateModel in interface InventoryFacadeDelegate
Parameters:
model -
Returns:
the model updated
See Also:
InventoryFacadeDelegate.updateModel(net.sf.oness.inventory.model.product.bo.Model)

deleteModel

public void deleteModel(java.lang.Long id)
Specified by:
deleteModel in interface InventoryFacadeDelegate
Parameters:
id -
See Also:
InventoryFacadeDelegate.deleteModel(java.lang.Long)

findModel

public Model findModel(java.lang.Long id)
Description copied from interface: InventoryFacadeDelegate
Find a model without its products nor sizes of its sizeGroup

Specified by:
findModel in interface InventoryFacadeDelegate
Parameters:
id -
Returns:
the model
See Also:
InventoryFacadeDelegate.findModel(java.lang.Long)

findModelWithDetails

public Model findModelWithDetails(java.lang.Long id)
Description copied from interface: InventoryFacadeDelegate
Find a model with all its products and sizes of its sizeGroup

Specified by:
findModelWithDetails in interface InventoryFacadeDelegate
Parameters:
id -
Returns:
the model
See Also:
InventoryFacadeDelegate.findModelWithDetails(java.lang.Long)

findProductWithDetails

public Product findProductWithDetails(java.lang.Long id)
Description copied from interface: InventoryFacadeDelegate
Find a product with all its stocks and prices

Specified by:
findProductWithDetails in interface InventoryFacadeDelegate
Parameters:
id -
Returns:
the product
See Also:
InventoryFacadeDelegate.findProductWithDetails(java.lang.Long)

findModel

public net.sf.oness.common.model.util.PaginatedList findModel(Model model,
                                                              int firstElement,
                                                              int maxElements)
Description copied from interface: InventoryFacadeDelegate
Find a model without products

Specified by:
findModel in interface InventoryFacadeDelegate
Parameters:
model -
firstElement -
maxElements -
Returns:
List of Model objects
See Also:
InventoryFacadeDelegate.findModel(net.sf.oness.inventory.model.product.bo.Model, int, int)

getAllSizeGroups

public java.util.List getAllSizeGroups()
Description copied from interface: InventoryFacadeDelegate
Get all size groups with its sizes

Specified by:
getAllSizeGroups in interface InventoryFacadeDelegate
Returns:
List of SizeGroup objects
See Also:
InventoryFacadeDelegate.getAllSizeGroups()

getAllColors

public java.util.List getAllColors()
Description copied from interface: InventoryFacadeDelegate
Get all colors

Specified by:
getAllColors in interface InventoryFacadeDelegate
Returns:
List of Color objects
See Also:
InventoryFacadeDelegate.getAllColors()

getAllFares

public java.util.List getAllFares()
Description copied from interface: InventoryFacadeDelegate
Get all fares

Specified by:
getAllFares in interface InventoryFacadeDelegate
Returns:
List of Fare objects
See Also:
InventoryFacadeDelegate.getAllFares()

getAllWarehouses

public java.util.List getAllWarehouses()
Description copied from interface: InventoryFacadeDelegate
Get all Warehouses

Specified by:
getAllWarehouses in interface InventoryFacadeDelegate
Returns:
List of Warehouse objects
See Also:
InventoryFacadeDelegate.getAllWarehouses()

editPrices

public Model editPrices(java.lang.Long modelId)
Description copied from interface: InventoryFacadeDelegate
Get a model for editing its prices

Specified by:
editPrices in interface InventoryFacadeDelegate
Parameters:
modelId - id of the model
Returns:
the model with all products and prices
See Also:
InventoryFacadeDelegate.editPrices(java.lang.Long)

updatePrices

public Model updatePrices(java.util.Map productPrices)
Description copied from interface: InventoryFacadeDelegate
Update the prices for some products. Prices that already don't exist for a fare and product will be created, else they will be updated if the amount has been modified or deleted if amount is null. All products must be from the same model.

Specified by:
updatePrices in interface InventoryFacadeDelegate
Parameters:
productPrices - Map with product ids as keys and a map (fare id, price amount as BigDecimal) as value.
Returns:
the model with prices updated
See Also:
InventoryFacadeDelegate.updatePrices(java.util.Map)

findProducts

public java.util.Map findProducts(java.util.Collection productIds)
Description copied from interface: InventoryFacadeDelegate
Find products by ids

Specified by:
findProducts in interface InventoryFacadeDelegate
Parameters:
productIds -
Returns:
Map with product ids as keys
See Also:
InventoryFacadeDelegate.findProducts(java.util.Collection)


Copyright © 2003-2005 ONess Project. All Rights Reserved.