コード例 #1
0
 @PreAuthorize("isAuthenticated ()")
 @Transactional(readOnly = true, propagation = Propagation.REQUIRED)
 @Cacheable(value = "product_count", key = "'all'")
 public int countAuthorizedProducts() {
   return productDao.count();
 }
コード例 #2
0
 @PreAuthorize("hasAnyRole('ROLE_DATA_MANAGER','ROLE_SEARCH')")
 @Transactional(readOnly = true, propagation = Propagation.REQUIRED)
 @Cacheable(value = "product_count", key = "{#filter, null}")
 public Integer count(String filter) {
   return productDao.count(filter, null, null);
 }