|
||||||||||
| 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 |
Category |
findCategoryByURI(String uri)
|
List<Category> |
readActiveSubCategoriesByCategory(Category category)
Retrieve a list of all active child categories of the passed in Category instance. |
List<Category> |
readActiveSubCategoriesByCategory(Category category,
int limit,
int offset)
Retrieve a list of all active child categories of the passed in Category instance. |
List<Category> |
readAllCategories()
Retrieve all categories in the datastore |
List<Category> |
readAllCategories(int limit,
int offset)
Retrieve a subset of all categories |
List<Category> |
readAllParentCategories()
|
List<Product> |
readAllProducts()
Retrieve all products in the datastore |
List<Product> |
readAllProducts(int limit,
int offset)
|
List<Category> |
readAllSubCategories(Category category)
Retrieve a list of all child categories of the passed in Category instance |
List<Category> |
readAllSubCategories(Category category,
int limit,
int offset)
Retrieve a list of all child categories of the passed in Category instance |
List<Category> |
readCategoriesByName(String categoryName)
Retrieve a list of Category instances by name. |
List<Category> |
readCategoriesByName(String categoryName,
int limit,
int offset)
|
Category |
readCategoryById(Long categoryId)
Retrieve a Category instance by its primary key |
Category |
readCategoryByName(String categoryName)
Deprecated. |
Category |
save(Category category)
Persist a Category instance to the datastore |
| Method Detail |
|---|
@Nonnull
Category readCategoryById(@Nonnull
Long categoryId)
Category instance by its primary key
categoryId - the primary key of the Category
Category at the specified primary key
@Nonnull
@Deprecated
Category readCategoryByName(@Nonnull
String categoryName)
Category instance by its name.
Broadleaf allows more than one category to have the same name. Calling
this method could produce an exception in such situations. Use
readCategoriesByName(String) instead.
categoryName - the name of the category
List<Category> readAllParentCategories()
@Nonnull
List<Category> readCategoriesByName(@Nonnull
String categoryName)
Category instances by name.
categoryName - the name to search by
@Nonnull
List<Category> readCategoriesByName(@Nonnull
String categoryName,
int limit,
int offset)
@Nonnull
Category save(@Nonnull
Category category)
Category instance to the datastore
category - the Category instance
Category after being persisted@Nonnull List<Category> readAllCategories()
Category instances in the datastore
@Nonnull
List<Category> readAllCategories(@Nonnull
int limit,
@Nonnull
int offset)
limit - the maximum number of results, defaults to 20offset - the starting point in the record set, defaults to 0
@Nonnull List<Product> readAllProducts()
Category instances in the datastore, regardless of their category association
@Nonnull
List<Product> readAllProducts(@Nonnull
int limit,
@Nonnull
int offset)
@Nonnull
List<Category> readAllSubCategories(@Nonnull
Category category)
Category instance
category - the parent category
@Nonnull
List<Category> readAllSubCategories(@Nonnull
Category category,
@Nonnull
int limit,
@Nonnull
int offset)
Category instance
category - the parent categorylimit - the maximum number of results to returnoffset - the starting point in the record set
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.common.persistence.EntityConfiguration">
<property name="entityContexts">
<list>
<value>classpath:myCompany-applicationContext-entity.xml</value>
</list>
</property>
</bean>
Category instance based on the Broadleaf entity configuration.@Nonnull List<Category> readActiveSubCategoriesByCategory(Category category)
Category instance.
This method bases its search on a current time value. To make the retrieval of values more
efficient, the current time is cached for a configurable amount of time. See
#getCurrentDateResolution()
category - the parent category
@Nonnull
List<Category> readActiveSubCategoriesByCategory(@Nonnull
Category category,
@Nonnull
int limit,
@Nonnull
int offset)
Category instance.
This method bases its search on a current time value. To make the retrieval of values more
efficient, the current time is cached for a configurable amount of time. See
#getCurrentDateResolution()
category - the parent categorylimit - the maximum number of results to returnoffset - the starting point in the record set
@Nonnull Category findCategoryByURI(String uri)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||