|
The Spring Framework Clinic.java source code
package org.springframework.samples.petclinic;
import java.util.Collection;
import org.springframework.dao.DataAccessException;
/**
* The high-level PetClinic business interface.
*
* <p>This is basically a data access object.
* PetClinic doesn't have a dedicated business facade.
*
* @author Ken Krebs
* @author Juergen Hoeller
* @author Sam Brannen
*/
public interface Clinic {
/**
* Retrieve all <code>Vets from the data store.
* @return a <code>Collection of Vet s
*/
Collection<Vet> getVets() throws DataAccessException;
/**
* Retrieve all <code>PetTypes from the data store.
* @return a <code>Collection of PetType s
*/
Collection<PetType> getPetTypes() throws DataAccessException;
/**
* Retrieve <code>Owners from the data store by last name,
* returning all owners whose last name <i>starts with the given name.
* @param lastName Value to search for
* @return a <code>Collection of matching Owner s
* (or an empty <code>Collection if none found)
*/
Collection<Owner> findOwners(String lastName) throws DataAccessException;
/**
* Retrieve an <code>Owner from the data store by id.
* @param id the id to search for
* @return the <code>Owner if found
* @throws org.springframework.dao.DataRetrievalFailureException if not found
*/
Owner loadOwner(int id) throws DataAccessException;
/**
* Retrieve a <code>Pet from the data store by id.
* @param id the id to search for
* @return the <code>Pet if found
* @throws org.springframework.dao.DataRetrievalFailureException if not found
*/
Pet loadPet(int id) throws DataAccessException;
/**
* Save an <code>Owner to the data store, either inserting or updating it.
* @param owner the <code>Owner to save
* @see BaseEntity#isNew
*/
void storeOwner(Owner owner) throws DataAccessException;
/**
* Save a <code>Pet to the data store, either inserting or updating it.
* @param pet the <code>Pet to save
* @see BaseEntity#isNew
*/
void storePet(Pet pet) throws DataAccessException;
/**
* Save a <code>Visit to the data store, either inserting or updating it.
* @param visit the <code>Visit to save
* @see BaseEntity#isNew
*/
void storeVisit(Visit visit) throws DataAccessException;
}
Other Spring Framework examples (source code examples)
Here is a short list of links related to this Spring Framework Clinic.java source code file:
|