|
||||||||||
| 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.lang.Long |
getCurrentDateResolution()
Retrieve the value in milliseconds for how long the current data/time is cached when performing an active category query. |
java.util.List<Category> |
readActiveSubCategoriesByCategory(Category category)
Retrieve a list of all active child categories of the passed in Category instance. |
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 |
java.util.List<Category> |
readCategoriesByName(java.lang.String categoryName)
Retrieve a list of Category instances by name. |
Category |
readCategoryById(java.lang.Long categoryId)
Retrieve a Category instance by its primary key |
Category |
readCategoryByName(java.lang.String categoryName)
Deprecated. |
Category |
save(Category category)
Persist a Category instance to the datastore |
void |
setCurrentDateResolution(java.lang.Long currentDateResolution)
Set the value in milliseconds for how long the current date/time is cached when performing an active category query. |
| 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
@Deprecated
Category readCategoryByName(@Nonnull
java.lang.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
@Nonnull
java.util.List<Category> readCategoriesByName(@Nonnull
java.lang.String categoryName)
Category instances by name.
categoryName - the name to search by
@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.@Nonnull java.util.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 java.lang.Long getCurrentDateResolution()
void setCurrentDateResolution(@Nonnull
java.lang.Long currentDateResolution)
currentDateResolution - the value in milliseconds for how long the current date/time is cached
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||