question: @ RequestMapping ( value = { "/" , "" } , method = RequestMethod . POST ) @ ResponseBody public RestWrapper update ( @ ModelAttribute ( "processtype" ) @ Valid WorkflowType workflowType , BindingResult bindingResult , Principal principal ) { RestWrapper restWrapper = null ; if ( bindingResult . hasErrors ( ) ) { BindingResultError bindingResultError = new BindingResultError ( ) ; return bindingResultError . errorMessage ( bindingResult ) ; } try { com . wipro . ats . bdre . md . dao . jpa . WorkflowType jpaWorkflowType = new com . wipro . ats . bdre . md . dao . jpa . WorkflowType ( ) ; jpaWorkflowType . setWorkflowId ( workflowType . getWorkflowId ( ) ) ; jpaWorkflowType . setWorkflowTypeName ( workflowType . getWorkflowTypeName ( ) ) ; workflowTypeDAO . update ( jpaWorkflowType ) ; restWrapper = new RestWrapper ( workflowType , RestWrapper . OK ) ; LOGGER . info ( "Record with ID:" + workflowType . getWorkflowId ( ) + " updated in BatchStatus by User:" + principal . getName ( ) + workflowType ) ; } catch ( Exception e ) { LOGGER . error ( e ) ; restWrapper = new RestWrapper ( e . getMessage ( ) , RestWrapper . ERROR ) ; } return restWrapper ; }
target:  This method calls proc UpdateWorkflowType and updates the values of the instance of WorkflowType passed. It also validates the values passed.