/** * Creates a pet. * * @param name the pet name * @param species the pet species * @return a new pet */ private Party createPet(String name, String species) { Party pet = TestHelper.createPatient(false); pet.setName(name); IMObjectBean bean = new IMObjectBean(pet); Lookup lookup = TestHelper.getLookup("lookup.species", species.toUpperCase(), species, true); bean.setValue("species", lookup.getCode()); return pet; }
/** * Helper to create an <em>lookup.veterinarySpeciality</em>. * * @param name the speciality name * @return a new lookup */ private Lookup createVetSpecialty(String name) { Lookup lookup = (Lookup) create("lookup.veterinarySpeciality"); lookup.setCode(name); lookup.setName(name); return lookup; }