|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.broadleafcommerce.core.catalog.dao.CategoryDaoImpl
@Repository(value="blCategoryDao") public class CategoryDaoImpl
| Field Summary | |
|---|---|
protected javax.persistence.EntityManager |
em
|
protected EntityConfiguration |
entityConfiguration
|
protected java.lang.String |
queryCacheableKey
|
| Constructor Summary | |
|---|---|
CategoryDaoImpl()
|
|
| Method Summary | |
|---|---|
Category |
create()
Create a new Category instance. |
void |
delete(Category category)
Removed the passed in Category instance from the datastore |
java.lang.String |
getQueryCacheableKey()
|
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 |
void |
setQueryCacheableKey(java.lang.String queryCacheableKey)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected javax.persistence.EntityManager em
protected EntityConfiguration entityConfiguration
protected java.lang.String queryCacheableKey
| Constructor Detail |
|---|
public CategoryDaoImpl()
| Method Detail |
|---|
public Category save(Category category)
CategoryDaoCategory instance to the datastore
save in interface CategoryDaocategory - the Category instance
Category after being persistedpublic Category readCategoryById(java.lang.Long categoryId)
CategoryDaoCategory instance by its primary key
readCategoryById in interface CategoryDaocategoryId - the primary key of the Category
Category at the specified primary keypublic Category readCategoryByName(java.lang.String categoryName)
CategoryDaoCategory instance by its name
readCategoryByName in interface CategoryDaocategoryName - the name of the category
Category having the specified namepublic java.util.List<Category> readAllCategories()
CategoryDao
readAllCategories in interface CategoryDaoCategory instances in the datastorepublic java.util.List<Product> readAllProducts()
CategoryDao
readAllProducts in interface CategoryDaoCategory instances in the datastore, regardless of their category associationpublic java.util.List<Category> readAllSubCategories(Category category)
CategoryDaoCategory instance
readAllSubCategories in interface CategoryDaocategory - the parent category
public java.lang.String getQueryCacheableKey()
public void setQueryCacheableKey(java.lang.String queryCacheableKey)
public void delete(Category category)
CategoryDaoCategory instance from the datastore
delete in interface CategoryDaocategory - the Category instance to removepublic Category create()
CategoryDaoCategory 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>
create in interface CategoryDaoCategory instance based on the Broadleaf entity configuration.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||