Package com.drighetto.springjpa.services

Examples of com.drighetto.springjpa.services.Processor


      // Create the Spring context
      ApplicationContext applicationContext = new ClassPathXmlApplicationContext(
          "applicationContext.xml");

      // Get the actions provider
      Processor processor = (Processor) applicationContext
          .getBean("myService");

      // Call actions...
      int delay = 5000;
      System.out.println("****READ****");
      processor.displayDeveloper();
      processor.displayDeveloperInfo();
      System.out
          .printf(
              "\nWaiting %sms for the demo between each CRUD actions...\n",
              delay);
      Thread.sleep(delay);
      System.out.println("\n\n\n$$$$$$$$$$$$$$$$$$$$$\n\n\n");
      System.out.println("****CREATE****");
      processor.addDeveloper();
      System.out
          .printf(
              "\nWaiting %sms for the demo between each CRUD actions...\n",
              delay);
      Thread.sleep(delay);
      System.out.println("\n\n\n$$$$$$$$$$$$$$$$$$$$$\n\n\n");
      System.out.println("****DELETE****");
      processor.removeDeveloper();
      System.out
          .printf(
              "\nWaiting %sms for the demo between each CRUD actions...\n",
              delay);
      Thread.sleep(delay);
      System.out.println("\n\n\n$$$$$$$$$$$$$$$$$$$$$\n\n\n");
      System.out.println("****UPDATE****");
      processor.updateDeveloper("JPA-MODIFIED");
      System.out
          .printf(
              "\nWaiting %sms for the demo between each CRUD actions...\n",
              delay);
      Thread.sleep(delay);
      System.out.println("\n\n\n$$$$$$$$$$$$$$$$$$$$$\n\n\n");
      System.out.println("****RESET DATA INITIAL STATE****");
      processor.updateDeveloper("RIGHETTO");
      System.out.println("=> OK !");

    } catch (Exception e) {
      e.printStackTrace();
    }
View Full Code Here

TOP

Related Classes of com.drighetto.springjpa.services.Processor

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.