Package org.springbyexample.schema.beans.person

Examples of org.springbyexample.schema.beans.person.Professional


    @RequestMapping(value = FIND_BY_ID_REQUEST, method = RequestMethod.GET)
    public ProfessionalResponse findById(@PathVariable(ID_VAR) Integer id) {
        logger.info("Find professional.  id={}", id);

        return new ProfessionalResponse()
                    .withResults(new Professional().withId(ID).withFirstName(FIRST_NAME).withLastName(LAST_NAME)
                                                  .withCompanyName(COMPANY_NAME));
    }
View Full Code Here


                                   @PathVariable(PAGE_SIZE_VAR) int pageSize) {
        logger.info("Find Professional page.  page={}  pageSize={}", page, pageSize);

        return new ProfessionalFindResponse()
                    .withCount(2)
                    .withResults(new Professional().withId(ID).withFirstName(FIRST_NAME).withLastName(LAST_NAME)
                                                   .withCompanyName(COMPANY_NAME),
                                 new Professional().withId(SECOND_ID).withFirstName(SECOND_FIRST_NAME).withLastName(SECOND_LAST_NAME)
                                                   .withCompanyName(SECOND_COMPANY_NAME));
    }
View Full Code Here

    public ProfessionalFindResponse find() {
        logger.info("Find all Professionals.");

        return new ProfessionalFindResponse()
                    .withCount(2)
                    .withResults(new Professional().withId(ID).withFirstName(FIRST_NAME).withLastName(LAST_NAME)
                                                   .withCompanyName(COMPANY_NAME),
                                 new Professional().withId(SECOND_ID).withFirstName(SECOND_FIRST_NAME).withLastName(SECOND_LAST_NAME)
                                                   .withCompanyName(SECOND_COMPANY_NAME));
    }
View Full Code Here

    @RequestMapping(value = FIND_BY_ID_REQUEST, method = RequestMethod.GET)
    public ProfessionalResponse findById(@PathVariable(ID_VAR) long id) {
        logger.info("Find professional.  id={}", id);

        return new ProfessionalResponse()
                    .withResult(new Professional().withId(ID).withFirstName(FIRST_NAME).withLastName(LAST_NAME)
                                                  .withCompanyName(COMPANY_NAME));
    }
View Full Code Here

                                   @PathVariable(PAGE_SIZE_VAR) int pageSize) {
        logger.info("Find Professional page.  page={}  pageSize={}", page, pageSize);

        return new ProfessionalFindResponse()
                    .withCount(2)
                    .withResults(new Professional().withId(ID).withFirstName(FIRST_NAME).withLastName(LAST_NAME)
                                                   .withCompanyName(COMPANY_NAME),
                                 new Professional().withId(SECOND_ID).withFirstName(SECOND_FIRST_NAME).withLastName(SECOND_LAST_NAME)
                                                   .withCompanyName(SECOND_COMPANY_NAME));
    }
View Full Code Here

    public ProfessionalFindResponse find() {
        logger.info("Find all Professionals.");

        return new ProfessionalFindResponse()
                    .withCount(2)
                    .withResults(new Professional().withId(ID).withFirstName(FIRST_NAME).withLastName(LAST_NAME)
                                                   .withCompanyName(COMPANY_NAME),
                                 new Professional().withId(SECOND_ID).withFirstName(SECOND_FIRST_NAME).withLastName(SECOND_LAST_NAME)
                                                   .withCompanyName(SECOND_COMPANY_NAME));
    }
View Full Code Here

        verifyRecord(response.getResults().get(0));
    }

    @Test
    public void testSave() {
        Professional request = new Professional().withId(ID).withFirstName(FIRST_NAME).withLastName(LAST_NAME)
                                                 .withCompanyName(COMPANY_NAME);
       
        ProfessionalResponse response = client.save(request);
       
        assertNotNull("Response is null.", response);
View Full Code Here

    }

    @Override
    protected Professional generateCreateRequest() {
        // update since primary key is specified
        return new Professional().withId(FIRST_ID).withFirstName(FIRST_NAME).withLastName(LAST_NAME)
                                 .withCompanyName(COMPANY_NAME);
    }
View Full Code Here

        return request.withLastName(NEW_LAST_NAME);
    }

    @Override
    protected Professional generateDeleteRequest() {
        return new Professional().withId(id);
    }
View Full Code Here

TOP

Related Classes of org.springbyexample.schema.beans.person.Professional

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.