Class CategoryXrefDaoImpl

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

@Repository("blCategoryXrefDao") public class CategoryXrefDaoImpl extends Object implements CategoryXrefDao
Author:
Jeff Fischer
  • Field Details

    • em

      protected jakarta.persistence.EntityManager em
    • entityConfiguration

      protected EntityConfiguration entityConfiguration
  • Constructor Details

    • CategoryXrefDaoImpl

      public CategoryXrefDaoImpl()
  • Method Details

    • readXrefsByCategoryId

      public List<CategoryXref> readXrefsByCategoryId(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 List<CategoryXref> readXrefsBySubCategoryId(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 CategoryXref readXrefByIds(Long categoryId, 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(CategoryXref 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 CategoryProductXref save(CategoryProductXref 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