Package examples

Examples of examples.Student


    * @throws Exception
    */
   protected void init() throws Exception {
     
     
      mary_ = new Student();
      mary_.setName("Mary Smith");
     
      Address address = new Address();
      address.setStreet("456 Oak Drive");
      address.setCity("Pleasantville, CA");
      address.setZip(94555);
     
      mary_.setAddress(address);
     
     
      joe_ = new Student();
      joe_.setName("Joe Smith");
      joe_.setSchool("Engineering");
     
      // Mary and Joe have the same address     
      joe_.setAddress(address);
View Full Code Here


      // Output
      printStatus("Initial state for Mary", mary_);     
      printStatus("Initial state for Joe", joe_);

      // Retrieve the pojos from the Server #2
      Student mary2 = (Student) cache2_.getObject("/students/54321");
      Student joe2  = (Student) cache2_.getObject("/students/65432");
      Course  foo2  = (Course) cache2_.getObject("/courses/101");

      System.out.println("---------------------------------------------");
      System.out.println("Modified on Server #1");
       // Change state in one of the items. This will be fine-grained replicated
      foo_.setRoom("101 Alvarez"); // Modified state on cache #2
      printStatus("Course Update: id: 401  room: null->101 Alvarez (retrieved from cache #2)"
                  , foo2);

      System.out.println("---------------------------------------------");
      System.out.println("Modified on Server #2");
       // Change state in one of the items. This will be fine-grained replicated
      joe2.addCourse(bar_); // Modified state on cache #2
      printStatus("Student Update: id: 65432  addCourse: Advanced Bar (retrieved from cache #1)"
                  , joe_);

      System.out.println("---------------------------------------------");
      System.out.println("Modified on Server #1");
View Full Code Here

    * @throws Exception
    */
   protected void init() throws Exception {


      mary_ = new Student();
      mary_.setName("Mary Smith");

      Address address = new Address();
      address.setStreet("456 Oak Drive");
      address.setCity("Pleasantville, CA");
      address.setZip(94555);

      mary_.setAddress(address);


      joe_ = new Student();
      joe_.setName("Joe Smith");
      joe_.setSchool("Engineering");

      // Mary and Joe have the same address
      joe_.setAddress(address);
View Full Code Here

      // Output
      printStatus("Initial state for Mary", mary_);
      printStatus("Initial state for Joe", joe_);

      // Retrieve the pojos from the Server #2
      Student mary2 = (Student) cache2_.getObject("/students/54321");
      Student joe2  = (Student) cache2_.getObject("/students/65432");
      Course  foo2  = (Course) cache2_.getObject("/courses/101");

      System.out.println("---------------------------------------------");
      System.out.println("Modified on Server #1");
       // Change state in one of the items. This will be fine-grained replicated
      foo_.setRoom("101 Alvarez"); // Modified state on cache #2
      printStatus("Course Update: id: 401  room: null->101 Alvarez (retrieved from cache #2)"
                  , foo2);

      System.out.println("---------------------------------------------");
      System.out.println("Modified on Server #2");
       // Change state in one of the items. This will be fine-grained replicated
      joe2.addCourse(bar_); // Modified state on cache #2
      printStatus("Student Update: id: 65432  addCourse: Advanced Bar (retrieved from cache #1)"
                  , joe_);

      System.out.println("---------------------------------------------");
      System.out.println("Modified on Server #1");
View Full Code Here

TOP

Related Classes of examples.Student

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.