@Repository public interface SubCategoryRepository extends org.springframework.data.jpa.repository.JpaRepository<SubCategory,Long>
| Modifier and Type | Method and Description |
|---|---|
SubCategory |
findByCode(String code) |
SubCategory |
findByDescription(String description) |
List<SubCategory> |
getAllActiveSubCategory() |
List<SubCategory> |
getAllActiveSubCategoryByCategoryId(Long categoryId) |
List<SubCategory> |
getAllSubCategory() |
List<SubCategory> |
getAllSubCategoryByCategoryId(Long categoryId) |
List<SubCategory> |
searchSubcategoryByCategoryIdAndSubCategoryId(Long category,
Long subCategoryId) |
deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAll, flush, getOne, save, saveAndFlushfindAllSubCategory findByDescription(String description)
SubCategory findByCode(String code)
@Query(value="from SubCategory sc where sc.active=true order by sc.description ") List<SubCategory> getAllActiveSubCategory()
@Query(value="from SubCategory sc where sc.active=true AND sc.category.id = :categoryId order by sc.description ") List<SubCategory> getAllActiveSubCategoryByCategoryId(@Param(value="categoryId") Long categoryId)
@Query(value="from SubCategory sc order by sc.description ") List<SubCategory> getAllSubCategory()
@Query(value="from SubCategory sc where sc.category.id=:categoryId AND sc.id=:subCategoryId order by sc.description") List<SubCategory> searchSubcategoryByCategoryIdAndSubCategoryId(@Param(value="categoryId") Long category, @Param(value="subCategoryId") Long subCategoryId)
@Query(value="from SubCategory sc where sc.category.id=:categoryId order by sc.description") List<SubCategory> getAllSubCategoryByCategoryId(@Param(value="categoryId") Long categoryId)
Copyright © 2015–2016 eGovernments Foundation. All rights reserved.