|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ProductDao
ProductDao provides persistence access to Product instances
Product,
ProductSku| Method Summary | |
|---|---|
Product |
create(ProductType productType)
Create a new Product instance. |
void |
delete(Product product)
Remove the passed in product instance from the datastore |
java.util.List<Product> |
readActiveProductsByCategory(java.lang.Long categoryId,
java.util.Date currentDate)
Find all products whose start and end dates are before and after the passed in date and who are related to the given category |
java.util.List<Product> |
readActiveProductsBySku(java.lang.Long skuId,
java.util.Date currentDate)
Find all products whose start and end dates are before and after the passed in date and who are related to the given sku. |
java.util.List<ProductSku> |
readActiveProductsBySkuOneToOne(java.lang.Long skuId,
java.util.Date currentDate)
Find all the ProductSku instances whose start and end dates are before and after the passed in
date and who are related to the given sku. |
Product |
readProductById(java.lang.Long productId)
Retrieve a Product instance by its primary key |
java.util.List<Product> |
readProductsByCategory(java.lang.Long categoryId)
Find all products related to the passed in category |
java.util.List<Product> |
readProductsByName(java.lang.String searchName)
Find all Product instances whose name starts with
or is equal to the passed in search parameter |
java.util.List<Product> |
readProductsBySku(java.lang.Long skuId)
Find all the products related to the passed in sku |
java.util.List<ProductSku> |
readProductsBySkuOneToOne(java.lang.Long skuId)
Find all the ProductSku instances related to the passed in sku. |
Product |
save(Product product)
Persist a Product instance to the datastore |
| Method Detail |
|---|
@Nonnull
Product readProductById(@Nonnull
java.lang.Long productId)
Product instance by its primary key
productId - the primary key of the product
@Nonnull
Product save(@Nonnull
Product product)
Product instance to the datastore
product - the product instance
@Nonnull
java.util.List<Product> readProductsByName(@Nonnull
java.lang.String searchName)
Product instances whose name starts with
or is equal to the passed in search parameter
searchName - the partial or whole name to match
@Nonnull
java.util.List<Product> readActiveProductsByCategory(@Nonnull
java.lang.Long categoryId,
@Nonnull
java.util.Date currentDate)
categoryId - the primary key of the category to whom the resulting product list should be relatedcurrentDate - the date for which the products should be checked against to determine their active state
@Nonnull
java.util.List<Product> readProductsByCategory(@Nonnull
java.lang.Long categoryId)
categoryId - the primary key of the category to whom the resulting product list should be related
@Nonnull
java.util.List<Product> readProductsBySku(@Nonnull
java.lang.Long skuId)
skuId - the primary key of the sku to whom the resulting product list should be related
Product and Sku.
@Nonnull
java.util.List<Product> readActiveProductsBySku(@Nonnull
java.lang.Long skuId,
@Nonnull
java.util.Date currentDate)
Product and Sku.
skuId - the primary key of the sku to whom the resulting product list should be relatedcurrentDate - the date for which the products should be checked against to determine their active state
@Nonnull
java.util.List<ProductSku> readProductsBySkuOneToOne(@Nonnull
java.lang.Long skuId)
ProductSku instances related to the passed in sku. Use this method if your
product domain is modelled with a OneToOne relationship between Product and Sku.
skuId - the primary key of the sku to whom the resulting ProductSku list should be related
ProductSku instances qualified for the sku
@Nonnull
java.util.List<ProductSku> readActiveProductsBySkuOneToOne(@Nonnull
java.lang.Long skuId,
@Nonnull
java.util.Date currentDate)
ProductSku instances whose start and end dates are before and after the passed in
date and who are related to the given sku. Use this method if your product domain is modelled
with a OneToOne relationship between Product and Sku.
skuId - the primary key of the sku to whom the resulting ProductSku list should be relatedcurrentDate - the date for which the ProductSku instances should be checked against to determine their active state
ProductSku instances qualifed for the sku and date
void delete(@Nonnull
Product product)
product - the product instance to removeProduct create(ProductType productType)
Product 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 Product to instantiate. To make Broadleaf instantiate your
extension of Product by default, include an entity configuration bean in your application context xml similar to:
<bean id="blEntityConfiguration" class="org.broadleafcommerce.persistence.EntityConfiguration">
<property name="entityContexts">
<list>
<value>classpath:myCompany-applicationContext-entity.xml</value>
</list>
</property>
</bean>
productType - the type of product you would like to create (presumably a Product or ProductSku instance). The getType method of ProductType provides the key for the entity configuration.
Product instance based on the Broadleaf entity configuration.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||