|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CategoryDao
CategoryDao provides persistence access to Category instances.
Category,
Product| Method Summary | |
|---|---|
Category |
create()
Create a new Category instance. |
void |
delete(Category category)
Removed the passed in Category instance from the datastore |
java.util.List<Category> |
readAllCategories()
Retrieve all categories in the datastore |
java.util.List<Product> |
readAllProducts()
Retrieve all products in the datastore |
java.util.List<Category> |
readAllSubCategories(Category category)
Retrieve a list of all child categories of the passed in Category instance |
Category |
readCategoryById(java.lang.Long categoryId)
Retrieve a Category instance by its primary key |
Category |
readCategoryByName(java.lang.String categoryName)
Retrieve a Category instance by its name |
Category |
save(Category category)
Persist a Category instance to the datastore |
| Method Detail |
|---|
@Nonnull
Category readCategoryById(@Nonnull
java.lang.Long categoryId)
Category instance by its primary key
categoryId - the primary key of the Category
Category at the specified primary key
@Nonnull
Category readCategoryByName(@Nonnull
java.lang.String categoryName)
Category instance by its name
categoryName - the name of the category
Category having the specified name
@Nonnull
Category save(@Nonnull
Category category)
Category instance to the datastore
category - the Category instance
Category after being persisted@Nonnull java.util.List<Category> readAllCategories()
Category instances in the datastore@Nonnull java.util.List<Product> readAllProducts()
Category instances in the datastore, regardless of their category association
@Nonnull
java.util.List<Category> readAllSubCategories(@Nonnull
Category category)
Category instance
category - the parent category
void delete(@Nonnull
Category category)
Category instance from the datastore
category - the Category instance to remove@Nonnull Category create()
Category 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 Category to instantiate. To make Broadleaf instantiate your
extension of Category 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>
Category instance based on the Broadleaf entity configuration.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||