org.springframework.samples.petportal.service
Class PetServiceImpl

java.lang.Object
  extended by org.springframework.samples.petportal.service.PetServiceImpl
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, PetService

public class PetServiceImpl
extends java.lang.Object
implements org.springframework.beans.factory.InitializingBean, PetService

The PetService implementation.

Author:
John A. Lewis, Mark Fisher, Juergen Hoeller

Field Summary
 
Fields inherited from interface org.springframework.samples.petportal.service.PetService
DEFAULT_DATE_FORMAT
 
Constructor Summary
PetServiceImpl()
           
 
Method Summary
 int addPet(Pet pet)
           
 int addPet(java.lang.String species, java.lang.String breed, java.lang.String name, java.util.Date birthdate)
           
 void afterPropertiesSet()
           
 void deletePet(int key)
           
 void deletePet(java.lang.Integer key)
           
 void deletePet(Pet pet)
           
 java.util.SortedSet getAllPets()
           
 Pet getPet(int key)
           
 Pet getPet(java.lang.Integer key)
           
 int getPetCount()
           
 void savePet(Pet pet)
           
 void setInitPets(int initPets)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PetServiceImpl

public PetServiceImpl()
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
                        throws org.springframework.beans.BeansException,
                               java.text.ParseException
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
org.springframework.beans.BeansException
java.text.ParseException

getPet

public Pet getPet(java.lang.Integer key)
Specified by:
getPet in interface PetService

getPet

public Pet getPet(int key)
Specified by:
getPet in interface PetService

getPetCount

public int getPetCount()
Specified by:
getPetCount in interface PetService

getAllPets

public java.util.SortedSet getAllPets()
Specified by:
getAllPets in interface PetService

addPet

public int addPet(Pet pet)
Specified by:
addPet in interface PetService

addPet

public int addPet(java.lang.String species,
                  java.lang.String breed,
                  java.lang.String name,
                  java.util.Date birthdate)
Specified by:
addPet in interface PetService

savePet

public void savePet(Pet pet)
Specified by:
savePet in interface PetService

deletePet

public void deletePet(java.lang.Integer key)
Specified by:
deletePet in interface PetService

deletePet

public void deletePet(Pet pet)
Specified by:
deletePet in interface PetService

deletePet

public void deletePet(int key)
Specified by:
deletePet in interface PetService

setInitPets

public void setInitPets(int initPets)


John A. Lewis, Mark Fisher, Juergen Hoeller