package org.springframework.samples.petclinic; import java.util.Collection; import javax.jws.WebService; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.PathParam; /** * The high-level PetClinic business interface. * *

This is basically a data access object. * PetClinic doesn't have a dedicated business facade. * * @author Ken Krebs * @author Juergen Hoeller * @author Sam Brannen */ @WebService public interface Clinic { /** * Retrieve all Vets from the data store. * @return a Collection of Vets */ Collection getVets(); /** * Retrieve all PetTypes from the data store. * @return a Collection of PetTypes */ Collection getPetTypes(); /** * Retrieve Owners from the data store by last name, * returning all owners whose last name starts with the given name. * @param lastName Value to search for * @return a Collection of matching Owners * (or an empty Collection if none found) */ Collection findOwners(String lastName); /** * Retrieve an Owner from the data store by id. * @param id the id to search for * @return the Owner if found * @throws org.springframework.dao.DataRetrievalFailureException if not found */ @GET @Path ("owner/{id}") Owner loadOwner(@PathParam ("id") int id); /** * Retrieve a Pet from the data store by id. * @param id the id to search for * @return the Pet if found * @throws org.springframework.dao.DataRetrievalFailureException if not found */ @GET @Path("pet/{id}") Pet loadPet(@PathParam("id") int id); /** * Save an Owner to the data store, either inserting or updating it. * @param owner the Owner to save * @see BaseEntity#isNew */ void storeOwner(Owner owner); /** * Save a Pet to the data store, either inserting or updating it. * @param pet the Pet to save * @see BaseEntity#isNew */ void storePet(Pet pet); /** * Save a Visit to the data store, either inserting or updating it. * @param visit the Visit to save * @see BaseEntity#isNew */ void storeVisit(Visit visit); }