Package org.springframework.samples.petclinic

Examples of org.springframework.samples.petclinic.Specialty


        owner.addPet(p2);
        owner = (Owner) system.save(owner);
    }

    private void initVets(PrevalentSystem system) {
        Specialty s1 = new Specialty();
        Specialty s2 = new Specialty();
        s1.setName("Surgery");
        s2.setName("Dentist");
        s1 = (Specialty) system.save(s1);
        s2 = (Specialty) system.save(s2);
       
        Vet v1 = new Vet();
        Vet v2 = new Vet();
View Full Code Here


      Vet vet = (Vet) vi.next();
      List vetSpecialtiesIds = getBrokerTemplate().selectMany("getSpecialtiesByVet", "id", vet.getId());
      Iterator vsi = vetSpecialtiesIds.iterator();
      while (vsi.hasNext()) {
        int specialtyId = ((Integer) vsi.next()).intValue();
        Specialty specialty = (Specialty) EntityUtils.getById(specialties, Specialty.class, specialtyId);
        vet.addSpecialty(specialty);
      }
    }

    return vets;
View Full Code Here

        Collection vets = clinic.getVets();
        for (Iterator i = vets.iterator(); i.hasNext();) {
            Vet vet = (Vet)i.next();
            DefaultMutableTreeNode vetNode = new DefaultMutableTreeNode(vet);
            for (Iterator s = vet.getSpecialties().iterator(); s.hasNext();) {
                Specialty specialty = (Specialty)s.next();
                vetNode.add(new DefaultMutableTreeNode(specialty));
            }
            rootNode.add(vetNode);
        }
        this.vetsTreeModel = new DefaultTreeModel(rootNode);
View Full Code Here

              public Integer mapRow(ResultSet rs, int row) throws SQLException {
                return Integer.valueOf(rs.getInt(1));
              }},
            vet.getId().intValue());
        for (int specialtyId : vetSpecialtiesIds) {
          Specialty specialty = EntityUtils.getById(specialties, Specialty.class, specialtyId);
          vet.addSpecialty(specialty);
        }
      }
    }
  }
View Full Code Here

              public Integer mapRow(ResultSet rs, int row) throws SQLException {
                return Integer.valueOf(rs.getInt(1));
              }},
            vet.getId().intValue());
        for (int specialtyId : vetSpecialtiesIds) {
          Specialty specialty = EntityUtils.getById(specialties, Specialty.class, specialtyId);
          vet.addSpecialty(specialty);
        }
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.springframework.samples.petclinic.Specialty

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.