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
           
 
Constructor Summary
CategoryXrefDaoImpl()
           
 
Method Summary
 void delete(CategoryXrefImpl categoryXref)
          Remove the passed in category relationship from the datastore
 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)
 CategoryProductXrefImpl save(CategoryProductXrefImpl categoryProductXref)
          Persist the passed in category/product relationship to the datastore
 CategoryXref save(CategoryXrefImpl categoryXref)
          Persist the passed in category relationship to the datastore
 
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
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
Persist 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

save

public CategoryProductXrefImpl save(CategoryProductXrefImpl categoryProductXref)
Description copied from interface: CategoryXrefDao
Persist the passed in category/product relationship to the datastore

Specified by:
save in interface CategoryXrefDao
Parameters:
categoryProductXref - the relationship between a category and product
Returns:
the persisted relationship between a category and product


Copyright © 2012. All Rights Reserved.