org.broadleafcommerce.inventory.dao
Class AvailabilityDaoImpl

java.lang.Object
  extended by org.broadleafcommerce.inventory.dao.AvailabilityDaoImpl
All Implemented Interfaces:
AvailabilityDao

@Repository(value="blAvailabilityDao")
public class AvailabilityDaoImpl
extends java.lang.Object
implements AvailabilityDao


Field Summary
protected  javax.persistence.EntityManager em
           
protected  java.lang.String queryCacheableKey
           
 
Constructor Summary
AvailabilityDaoImpl()
           
 
Method Summary
 java.lang.String getQueryCacheableKey()
           
 java.util.List<SkuAvailability> readSKUAvailability(java.util.List<java.lang.Long> skuIds, boolean realTime)
          Returns a SKU Availability record for the passed in skuId.
 java.util.List<SkuAvailability> readSKUAvailabilityForLocation(java.util.List<java.lang.Long> skuIds, java.lang.Long locationId, boolean realTime)
          Returns a SKU Availability record for the passed in skuId and locationId.
 void save(SkuAvailability skuAvailability)
           
 void setQueryCacheableKey(java.lang.String queryCacheableKey)
           
 
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

queryCacheableKey

protected java.lang.String queryCacheableKey
Constructor Detail

AvailabilityDaoImpl

public AvailabilityDaoImpl()
Method Detail

readSKUAvailability

public java.util.List<SkuAvailability> readSKUAvailability(java.util.List<java.lang.Long> skuIds,
                                                           boolean realTime)
Description copied from interface: AvailabilityDao
Returns a SKU Availability record for the passed in skuId. Uses a cacheable query unless the realTime flag is set to true.

Specified by:
readSKUAvailability in interface AvailabilityDao
Returns:

readSKUAvailabilityForLocation

public java.util.List<SkuAvailability> readSKUAvailabilityForLocation(java.util.List<java.lang.Long> skuIds,
                                                                      java.lang.Long locationId,
                                                                      boolean realTime)
Description copied from interface: AvailabilityDao
Returns a SKU Availability record for the passed in skuId and locationId. Uses a cacheable query unless the realTime flag is set to true.

Specified by:
readSKUAvailabilityForLocation in interface AvailabilityDao
Returns:

save

public void save(SkuAvailability skuAvailability)
Specified by:
save in interface AvailabilityDao

getQueryCacheableKey

public java.lang.String getQueryCacheableKey()

setQueryCacheableKey

public void setQueryCacheableKey(java.lang.String queryCacheableKey)


Copyright © 2010. All Rights Reserved.