@RequestMapping(value={"","/"},method=RequestMethod.GET) @ResponseBody public RestWrapper list(@RequestParam(value="page",defaultValue="0") int startPage,@RequestParam(value="size",defaultValue="10") int pageSize,Principal principal){
  RestWrapper restWrapper=null;
  try {
    Integer counter=propertiesDAO.totalRecordCount();
    List<Properties> getProperties=new ArrayList<Properties>();
    for (    Integer processId : propertiesDAO.list(startPage,pageSize)) {
      com.wipro.ats.bdre.md.beans.table.Properties returnProperties=new com.wipro.ats.bdre.md.beans.table.Properties();
      returnProperties.setProcessId(processId);
      returnProperties.setCounter(counter);
      getProperties.add(returnProperties);
    }
    restWrapper=new RestWrapper(getProperties,RestWrapper.OK);
    LOGGER.info("All records listed from Properties by User:" + principal.getName());
  }
 catch (  MetadataException e) {
    LOGGER.error(e);
    restWrapper=new RestWrapper(e.getMessage(),RestWrapper.ERROR);
  }
  return restWrapper;
}

@ RequestMapping ( value = { "" , "/" } , method = RequestMethod . GET ) @ ResponseBody public RestWrapper list ( @ RequestParam ( value = "page" , defaultValue = "0" ) int startPage , @ RequestParam ( value = "size" , defaultValue = "10" ) int pageSize , Principal principal ) { RestWrapper restWrapper = null ; try { Integer counter = propertiesDAO . totalRecordCount ( ) ; List < Properties > getProperties = new ArrayList < Properties > ( ) ; for ( Integer processId : propertiesDAO . list ( startPage , pageSize ) ) { com . wipro . ats . bdre . md . beans . table . Properties returnProperties = new com . wipro . ats . bdre . md . beans . table . Properties ( ) ; returnProperties . setProcessId ( processId ) ; returnProperties . setCounter ( counter ) ; getProperties . add ( returnProperties ) ; } restWrapper = new RestWrapper ( getProperties , RestWrapper . OK ) ; LOGGER . info ( "All records listed from Properties by User:" + principal . getName ( ) ) ; } catch ( MetadataException e ) { LOGGER . error ( e ) ; restWrapper = new RestWrapper ( e . getMessage ( ) , RestWrapper . ERROR ) ; } return restWrapper ; }
this method calls proc listproperty and fetches a list of instances of properties .
