Interface CategoryXrefDao

All Known Implementing Classes:
CategoryXrefDaoImpl

public interface CategoryXrefDao
CategoryXrefDao provides persistence access to the relationship between a category and its sub-categories. This includes an ordering field.
Author:
Jeff Fischer
See Also:
  • Method Details

    • readXrefsByCategoryId

      @Nonnull List<CategoryXref> readXrefsByCategoryId(@Nonnull Long categoryId)
      Retrieve all the category relationships for which the passed in Category primary key is a parent
      Parameters:
      categoryId - the parent Category primary key
      Returns:
      the list of child category relationships for the parent primary key
    • readXrefsBySubCategoryId

      @Nonnull List<CategoryXref> readXrefsBySubCategoryId(@Nonnull Long subCategoryId)
      Retrieve all the category relationships for which the passed in Category primary key is a sub category (or child)
      Parameters:
      subCategoryId - the sub-categories primary key
      Returns:
      the list of category relationships for the sub-category primary key
    • readXrefByIds

      @Nonnull CategoryXref readXrefByIds(@Nonnull Long categoryId, @Nonnull Long subCategoryId)
      Find a specific relationship between a parent categoy and sub-category (child)
      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

      @Nonnull CategoryXref save(@Nonnull CategoryXrefImpl categoryXref)
      Persist the passed in category relationship to the datastore
      Parameters:
      categoryXref - the relationship between a parent and child category
      Returns:
      the persisted relationship between a parent and child category
    • delete

      void delete(@Nonnull CategoryXref categoryXref)
      Remove the passed in category relationship from the datastore
      Parameters:
      categoryXref - the category relationship to remove
    • save

      @Nonnull CategoryProductXref save(CategoryProductXref categoryProductXref)
      Persist the passed in category/product relationship to the datastore
      Parameters:
      categoryProductXref - the relationship between a category and product
      Returns:
      the persisted relationship between a category and product