Package org.springbyexample.schema.beans.response

Examples of org.springbyexample.schema.beans.response.Message


    @RequestMapping(value = SAVE_REQUEST, method = RequestMethod.POST)
    public ProfessionalResponse create(@RequestBody Professional request) {
        logger.info("Save Professional.  id={}", request.getId());

        return new ProfessionalResponse().withMessageList(
                    new Message().withMessageType(MessageType.INFO)
                                 .withMessage(String.format("Successfully saved record.  id='%d'", request.getId())))
                    .withResults(request);
    }
View Full Code Here


        Assert.isTrue((request.getId() 0), "Update should have a valid primary key");

        logger.info("Update person.  id={}", request.getId());

        return new ProfessionalResponse().withMessageList(
                new Message().withMessageType(MessageType.INFO)
                             .withMessage(String.format("Successfully saved record.  id='%d'", request.getId())))
                .withResults(request);
    }
View Full Code Here

    @RequestMapping(value = DELETE_PK_REQUEST, method = RequestMethod.DELETE)
    public ProfessionalResponse delete(@PathVariable(ID_VAR) Integer id) {
        logger.info("Delete Professional.  id={}", id);

        return new ProfessionalResponse().withMessageList(
                    new Message().withMessageType(MessageType.INFO)
                                 .withMessage(String.format("Successfully deleted record.  id='%d'", id)));
    }
View Full Code Here

        int id = request.getId();

        logger.info("Delete professional.  id={}", id);

        return new ProfessionalResponse().withMessageList(
                new Message().withMessageType(MessageType.INFO)
                             .withMessage(String.format("Successfully deleted record.  id='%d'", id)));
    }
View Full Code Here

    @RequestMapping(value = SAVE_REQUEST, method = RequestMethod.POST)
    public ProfessionalResponse save(@RequestBody Professional request) {
        logger.info("Save Professional.  id={}", request.getId());

        return new ProfessionalResponse().withMessageList(
                    new Message().withMessageType(MessageType.INFO)
                                 .withMessage(String.format("Successfully saved record.  id='%d'", request.getId())))
                    .withResult(request);
    }
View Full Code Here

    @RequestMapping(value = DELETE_REQUEST, method = RequestMethod.DELETE)
    public ResponseResult delete(@PathVariable(ID_VAR) long id) {
        logger.info("Delete Professional.  id={}", id);

        return new ResponseResult().withMessageList(
                    new Message().withMessageType(MessageType.INFO)
                                 .withMessage(String.format("Successfully deleted record.  id='%d'", id)));
    }
View Full Code Here

    @RequestMapping(value = SAVE_REQUEST, method = RequestMethod.POST)
    public PersonResponse save(@RequestBody Person request) {
        logger.info("Save person.  id={}", request.getId());

        return new PersonResponse().withMessageList(
                    new Message().withMessageType(MessageType.INFO)
                                 .withMessage(String.format("Successfully saved record.  id='%d'", request.getId())))
                    .withResult(request);
    }
View Full Code Here

    @RequestMapping(value = DELETE_REQUEST, method = RequestMethod.DELETE)
    public ResponseResult delete(@PathVariable(ID_VAR) long id) {
        logger.info("Delete person.  id={}", id);

        return new ResponseResult().withMessageList(
                    new Message().withMessageType(MessageType.INFO)
                                 .withMessage(String.format("Successfully deleted record.  id='%d'", id)));
    }
View Full Code Here

        return createFindResponse(results);
    }

    @Override
    protected PersonResponse createSaveResponse(Person result) {
        return new PersonResponse().withMessageList(new Message().withMessageType(MessageType.INFO)
                    .withMessage(getMessage(SAVE_MSG, new Object[] { result.getFirstName(), result.getLastName()})))
                    .withResults(result);
    }
View Full Code Here

                    .withResults(result);
    }

    @Override
    protected PersonResponse createDeleteResponse() {
        return new PersonResponse().withMessageList(new Message().withMessageType(MessageType.INFO)
                .withMessageKey(DELETE_MSG).withMessage(getMessage(DELETE_MSG)));
    }
View Full Code Here

TOP

Related Classes of org.springbyexample.schema.beans.response.Message

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.