Package org.springframework.integration.samples.jpa.service

Examples of org.springframework.integration.samples.jpa.service.PersonService


    context.load("classpath:META-INF/spring/integration/*-context.xml");
    context.registerShutdownHook();
    context.refresh();

    final PersonService personService = context.getBean(PersonService.class);

    System.out.println("Please enter a choice and press <enter>: ");
    System.out.println("\t1. List all people");
    System.out.println("\t2. Create a new person");
    System.out.println("\tq. Quit the application");
View Full Code Here


  public void insertPersonRecord() {

    final ApplicationContext context = new ClassPathXmlApplicationContext(
      "classpath:/META-INF/spring/integration/spring-integration-context.xml");

    final PersonService service = context.getBean(PersonService.class);

    LOGGER.info("Creating person Instance");

    final Person person = new Person();
    Calendar createdDateTime = Calendar.getInstance();
    createdDateTime.set(1980, 0, 1);
    person.setCreatedDateTime(createdDateTime.getTime());
    person.setName("Name Of The Person");

    final Person persistedPerson = service.createPerson(person);
    Assert.assertNotNull("Expected a non null instance of Person, got null", persistedPerson);
    LOGGER.info("\n\tGenerated person with id: " + persistedPerson.getId() + ", with name: " + persistedPerson.getName());
  }
View Full Code Here

TOP

Related Classes of org.springframework.integration.samples.jpa.service.PersonService

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.