Subversion Repositories SmartDukaan

Rev

Rev 22037 | Rev 23568 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 22037 Rev 22931
Line 27... Line 27...
27
@Controller
27
@Controller
28
@Transactional(rollbackFor=Throwable.class)
28
@Transactional(rollbackFor=Throwable.class)
29
public class BrandController {
29
public class BrandController {
30
 
30
 
31
	@Autowired
31
	@Autowired
32
	ResponseSender<?> responseSender;
32
	private ResponseSender<?> responseSender;
33
	
33
	
34
	private static final Logger LOGGER=LoggerFactory.getLogger(BrandController.class);
34
	private static final Logger LOGGER=LoggerFactory.getLogger(BrandController.class);
35
	
35
	
36
	@Autowired
36
	@Autowired
37
	BrandRepository brandRepository;
37
	private BrandRepository brandRepository;
38
	
38
	
39
	@RequestMapping(value = ProfitMandiConstants.URL_BRAND_ALL, method=RequestMethod.GET)
39
	@RequestMapping(value = ProfitMandiConstants.URL_BRAND_ALL, method=RequestMethod.GET)
40
	public ResponseEntity<?> getAll(HttpServletRequest request, @RequestParam(name = ProfitMandiConstants.PAGE_NUMBER) int pageNumber, @RequestParam(name = ProfitMandiConstants.PAGE_SIZE) int pageSize){
40
	public ResponseEntity<?> getAll(HttpServletRequest request, @RequestParam(name = ProfitMandiConstants.PAGE_NUMBER) int pageNumber, @RequestParam(name = ProfitMandiConstants.PAGE_SIZE) int pageSize){
41
		LOGGER.info("requested url : "+request.getRequestURL().toString());
41
		LOGGER.info("requested url : "+request.getRequestURL().toString());
42
		List<Brand> brands = brandRepository.selectAll(pageNumber, pageSize);
42
		List<Brand> brands = brandRepository.selectAll(pageNumber, pageSize);