public interface SkuDao
SkuDao provides persistence access to Sku instances| Modifier and Type | Method and Description |
|---|---|
Sku |
create()
Create a new
Sku instance. |
void |
delete(Sku sku)
Remove the
Sku instance from the datastore |
List<Sku> |
findSkuByURI(String key)
Look up a sku that matches the given URI
|
Long |
getCurrentDateResolution()
Returns the number of milliseconds that the current date/time will be cached for queries before refreshing.
|
List<Sku> |
readAllActiveSkus(int page,
int pageSize)
Reads all Skus from the database that are currently active.
|
List<Sku> |
readAllSkus()
Retrieve all
Sku instances from the datastore |
Long |
readCountAllActiveSkus()
Returns the number of Skus that are currently active.
|
Sku |
readFirstSku()
Retrieve the
Sku instance whose primary key is the smallest
of all skus in the datastore |
Sku |
readSkuByExternalId(String externalId)
Retrieve a
Sku instance by its external id |
Sku |
readSkuById(Long skuId)
Retrieve a
Sku instance by its primary key |
Sku |
readSkuByUpc(String upc)
Queries for a
Sku instance by its Universal Product Code (UPC). |
List<Sku> |
readSkusByIds(List<Long> ids)
Find all the
Sku instances whose primary key matches
one of the values from the passed in list |
Sku |
save(Sku sku)
Persist a
Sku instance to the datastore |
SkuFee |
saveSkuFee(SkuFee fee) |
void |
setCurrentDateResolution(Long currentDateResolution)
Sets the number of milliseconds that the current date/time will be cached for queries before refreshing.
|
Sku readSkuById(Long skuId)
Sku instance by its primary keyskuId - the primary key of the skuSku readSkuByUpc(String upc)
Sku instance by its Universal Product Code (UPC).upc - Sku readSkuByExternalId(String externalId)
Sku instance by its external idexternalId - the external id of the skuSku save(Sku sku)
Sku instance to the datastoresku - the sku to persistSku readFirstSku()
Sku instance whose primary key is the smallest
of all skus in the datastoreList<Sku> readAllSkus()
Sku instances from the datastoreList<Sku> readSkusByIds(List<Long> ids)
Sku instances whose primary key matches
one of the values from the passed in listids - the list of primary key valuesvoid delete(Sku sku)
Sku instance from the datastoresku - the sku to removeSku create()
Sku instance. The system will use the configuration in
/BroadleafCommerce/core/BroadleafCommerceFramework/src/main/resources/bl-framework-applicationContext-entity.xml
to determine which polymorphic version of Sku to instantiate. To make Broadleaf instantiate your
extension of Sku by default, include an entity configuration bean in your application context xml similar to:
<bean id="blEntityConfiguration" class="org.broadleafcommerce.common.persistence.EntityConfiguration">
<property name="entityContexts">
<list>
<value>classpath:myCompany-applicationContext-entity.xml</value>
</list>
</property>
</bean>
Sku instance based on the Broadleaf entity configuration.Long readCountAllActiveSkus()
List<Sku> readAllActiveSkus(int page, int pageSize)
page - - the number of the page to get (0 indexed)pageSize - - the number of results per pageLong getCurrentDateResolution()
void setCurrentDateResolution(Long currentDateResolution)
currentDateResolution - the milliseconds to cache the current date/timeCopyright © 2017. All rights reserved.