Subversion Repositories SmartDukaan

Rev

Rev 21448 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 21448 Rev 21496
Line 33... Line 33...
33
	
33
	
34
	@Autowired
34
	@Autowired
35
	RoleRepository roleRepository;
35
	RoleRepository roleRepository;
36
	
36
	
37
	@RequestMapping(value = ProfitMandiConstants.URL_ROLE_ALL,method=RequestMethod.GET)
37
	@RequestMapping(value = ProfitMandiConstants.URL_ROLE_ALL,method=RequestMethod.GET)
38
	public ResponseEntity<?> getAll(HttpServletRequest request){
38
	public ResponseEntity<?> getAll(HttpServletRequest request, @RequestParam(name = ProfitMandiConstants.PAGE_NUMBER) int pageNumber, @RequestParam(name = ProfitMandiConstants.PAGE_SIZE) int pageSize){
39
		LOGGER.info("requested url : "+request.getRequestURL().toString());
39
		LOGGER.info("requested url : "+request.getRequestURL().toString());
40
		return responseSender.ok(roleRepository.selectAll());
40
		return responseSender.ok(roleRepository.selectAll(pageNumber, pageSize));
41
	}
41
	}
42
	
42
	
43
	@RequestMapping(value = ProfitMandiConstants.URL_ROLE_ID,method=RequestMethod.GET)
43
	@RequestMapping(value = ProfitMandiConstants.URL_ROLE_ID,method=RequestMethod.GET)
44
	public ResponseEntity<?> getById(HttpServletRequest request, @RequestParam(name = "id") int id){
44
	public ResponseEntity<?> getById(HttpServletRequest request, @RequestParam(name = "id") int id){
45
		LOGGER.info("requested url : "+request.getRequestURL().toString());
45
		LOGGER.info("requested url : "+request.getRequestURL().toString());