org.broadleafcommerce.core.catalog.dao
Class CategoryXrefDaoImpl

java.lang.Object
  extended by org.broadleafcommerce.core.catalog.dao.CategoryXrefDaoImpl
All Implemented Interfaces:
CategoryXrefDao

@Repository(value="blCategoryXrefDao")
public class CategoryXrefDaoImpl
extends java.lang.Object
implements CategoryXrefDao

Author:
Jeff Fischer

Field Summary
protected  javax.persistence.EntityManager em
           
protected  EntityConfiguration entityConfiguration
           
protected  java.lang.String queryCacheableKey
           
 
Constructor Summary
CategoryXrefDaoImpl()
           
 
Method Summary
 void delete(CategoryXrefImpl categoryXref)
          Remove the passed in category relationship from the datastore
 java.lang.String getQueryCacheableKey()
           
 CategoryXrefImpl readXrefByIds(java.lang.Long categoryId, java.lang.Long subCategoryId)
          Find a specific relationship between a parent categoy and sub-category (child)
 java.util.List<CategoryXrefImpl> readXrefsByCategoryId(java.lang.Long categoryId)
          Retrieve all the category relationships for which the passed in Category primary key is a parent
 java.util.List<CategoryXrefImpl> readXrefsBySubCategoryId(java.lang.Long subCategoryId)
          Retrieve all the category relationships for which the passed in Category primary key is a sub category (or child)
 CategoryXref save(CategoryXrefImpl categoryXref)
          Persiste the passed in category relationship 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

em

protected javax.persistence.EntityManager em

entityConfiguration

protected EntityConfiguration entityConfiguration

queryCacheableKey

protected java.lang.String queryCacheableKey
Constructor Detail

CategoryXrefDaoImpl

public CategoryXrefDaoImpl()
Method Detail

readXrefsByCategoryId

public java.util.List<CategoryXrefImpl> readXrefsByCategoryId(java.lang.Long categoryId)
Description copied from interface: CategoryXrefDao
Retrieve all the category relationships for which the passed in Category primary key is a parent

Specified by:
readXrefsByCategoryId in interface CategoryXrefDao
Parameters:
categoryId - the parent Category primary key
Returns:
the list of child category relationships for the parent primary key

readXrefsBySubCategoryId

public java.util.List<CategoryXrefImpl> readXrefsBySubCategoryId(java.lang.Long subCategoryId)
Description copied from interface: CategoryXrefDao
Retrieve all the category relationships for which the passed in Category primary key is a sub category (or child)

Specified by:
readXrefsBySubCategoryId in interface CategoryXrefDao
Parameters:
subCategoryId - the sub-categories primary key
Returns:
the list of category relationships for the sub-category primary key

readXrefByIds

public CategoryXrefImpl readXrefByIds(java.lang.Long categoryId,
                                      java.lang.Long subCategoryId)
Description copied from interface: CategoryXrefDao
Find a specific relationship between a parent categoy and sub-category (child)

Specified by:
readXrefByIds in interface CategoryXrefDao
Parameters:
categoryId - The primary key of the parent category
subCategoryId - The primary key of the sub-category
Returns:
The relationship between the parent and child categories

save

public CategoryXref save(CategoryXrefImpl categoryXref)
Description copied from interface: CategoryXrefDao
Persiste the passed in category relationship to the datastore

Specified by:
save in interface CategoryXrefDao
Parameters:
categoryXref - the relationship between a parent and child category
Returns:
the persisted relationship between a parent and child category

delete

public void delete(CategoryXrefImpl categoryXref)
Description copied from interface: CategoryXrefDao
Remove the passed in category relationship from the datastore

Specified by:
delete in interface CategoryXrefDao
Parameters:
categoryXref - the category relationship to remove

getQueryCacheableKey

public java.lang.String getQueryCacheableKey()

setQueryCacheableKey

public void setQueryCacheableKey(java.lang.String queryCacheableKey)


Copyright © 2011. All Rights Reserved.