org.broadleafcommerce.core.catalog.dao
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:
CategoryXref

Method Summary
 void delete(CategoryXrefImpl categoryXref)
          Remove the passed in category relationship from the datastore
 CategoryXref readXrefByIds(Long categoryId, Long subCategoryId)
          Find a specific relationship between a parent categoy and sub-category (child)
 List<CategoryXrefImpl> readXrefsByCategoryId(Long categoryId)
          Retrieve all the category relationships for which the passed in Category primary key is a parent
 List<CategoryXrefImpl> readXrefsBySubCategoryId(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
 

Method Detail

readXrefsByCategoryId

@Nonnull
List<CategoryXrefImpl> 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<CategoryXrefImpl> 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
            CategoryXrefImpl categoryXref)
Remove the passed in category relationship from the datastore

Parameters:
categoryXref - the category relationship to remove

save

@Nonnull
CategoryProductXrefImpl save(CategoryProductXrefImpl 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


Copyright © 2012. All Rights Reserved.