alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Spring Framework example source code file (Clinic.java)

This example Spring Framework source code file (Clinic.java) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Spring Framework tags/keywords

clinic, collection, collection, dataaccessexception, dataaccessexception, owner, owner, pet, pet, util

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 Vets
	 */
	Collection<Vet> getVets() throws DataAccessException;

	/**
	 * Retrieve all <code>PetTypes from the data store.
	 * @return a <code>Collection of PetTypes
	 */
	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 Owners
	 * (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:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.