org.broadleafcommerce.inventory.dao
Class FulfillmentLocationDaoImpl

java.lang.Object
  extended by org.broadleafcommerce.inventory.dao.FulfillmentLocationDaoImpl
All Implemented Interfaces:
FulfillmentLocationDao

@Repository(value="blFulfillmentLocationDao")
public class FulfillmentLocationDaoImpl
extends Object
implements FulfillmentLocationDao


Field Summary
protected  javax.persistence.EntityManager em
           
 
Constructor Summary
FulfillmentLocationDaoImpl()
           
 
Method Summary
 void delete(FulfillmentLocation fulfillmentLocation)
          Deletes the passed FulfillmentLocation
 List<FulfillmentLocation> readAll()
          Retrieves all of the fulfillment locations
 List<FulfillmentLocation> readAllFulfillmentLocationsForSku(Long skuId)
          Reads all fulfillment locations associated with a sku
 FulfillmentLocation readById(Long fulfillmentLocationId)
          Retrieves a FulfillmentLocation from the given id
 FulfillmentLocation readDefaultFulfillmentLocation()
          Reads the first fulfillment location that it finds that is flagged as default
 FulfillmentLocation save(FulfillmentLocation fulfillmentLocation)
          Persists the FulfillmentLocation
 void updateOtherDefaultLocationToFalse(FulfillmentLocation fulfillmentLocation)
          Sets the defaultLocation flag to false for all fulfillmentLocations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

em

protected javax.persistence.EntityManager em
Constructor Detail

FulfillmentLocationDaoImpl

public FulfillmentLocationDaoImpl()
Method Detail

readAll

public List<FulfillmentLocation> readAll()
Description copied from interface: FulfillmentLocationDao
Retrieves all of the fulfillment locations

Specified by:
readAll in interface FulfillmentLocationDao
Returns:
List of FulfillmentLocation

readById

public FulfillmentLocation readById(Long fulfillmentLocationId)
Description copied from interface: FulfillmentLocationDao
Retrieves a FulfillmentLocation from the given id

Specified by:
readById in interface FulfillmentLocationDao
Returns:
FulfillmentLocation

save

public FulfillmentLocation save(FulfillmentLocation fulfillmentLocation)
Description copied from interface: FulfillmentLocationDao
Persists the FulfillmentLocation

Specified by:
save in interface FulfillmentLocationDao
Returns:
the persisted FulfillmentLocation

delete

public void delete(FulfillmentLocation fulfillmentLocation)
Description copied from interface: FulfillmentLocationDao
Deletes the passed FulfillmentLocation

Specified by:
delete in interface FulfillmentLocationDao

updateOtherDefaultLocationToFalse

public void updateOtherDefaultLocationToFalse(FulfillmentLocation fulfillmentLocation)
Description copied from interface: FulfillmentLocationDao
Sets the defaultLocation flag to false for all fulfillmentLocations

Specified by:
updateOtherDefaultLocationToFalse in interface FulfillmentLocationDao

readDefaultFulfillmentLocation

public FulfillmentLocation readDefaultFulfillmentLocation()
Description copied from interface: FulfillmentLocationDao
Reads the first fulfillment location that it finds that is flagged as default

Specified by:
readDefaultFulfillmentLocation in interface FulfillmentLocationDao

readAllFulfillmentLocationsForSku

public List<FulfillmentLocation> readAllFulfillmentLocationsForSku(Long skuId)
Description copied from interface: FulfillmentLocationDao
Reads all fulfillment locations associated with a sku

Specified by:
readAllFulfillmentLocationsForSku in interface FulfillmentLocationDao
Returns:


Copyright © 2013. All Rights Reserved.