org.springframework.samples.petclinic
Class Owner

java.lang.Object
  extended by org.springframework.samples.petclinic.BaseEntity
      extended by org.springframework.samples.petclinic.Person
          extended by org.springframework.samples.petclinic.Owner

public class Owner
extends Person

Simple JavaBean domain object representing an owner.

Author:
Ken Krebs, Juergen Hoeller, Sam Brannen

Constructor Summary
Owner()
           
 
Method Summary
 void addPet(Pet pet)
           
 java.lang.String getAddress()
           
 java.lang.String getCity()
           
 Pet getPet(java.lang.String name)
          Return the Pet with the given name, or null if none found for this Owner.
 Pet getPet(java.lang.String name, boolean ignoreNew)
          Return the Pet with the given name, or null if none found for this Owner.
 java.util.List<Pet> getPets()
           
protected  java.util.Set<Pet> getPetsInternal()
           
 java.lang.String getTelephone()
           
 void setAddress(java.lang.String address)
           
 void setCity(java.lang.String city)
           
protected  void setPetsInternal(java.util.Set<Pet> pets)
           
 void setTelephone(java.lang.String telephone)
           
 java.lang.String toString()
           
 
Methods inherited from class org.springframework.samples.petclinic.Person
getFirstName, getLastName, setFirstName, setLastName
 
Methods inherited from class org.springframework.samples.petclinic.BaseEntity
getId, isNew, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Owner

public Owner()
Method Detail

getAddress

public java.lang.String getAddress()

setAddress

public void setAddress(java.lang.String address)

getCity

public java.lang.String getCity()

setCity

public void setCity(java.lang.String city)

getTelephone

public java.lang.String getTelephone()

setTelephone

public void setTelephone(java.lang.String telephone)

setPetsInternal

protected void setPetsInternal(java.util.Set<Pet> pets)

getPetsInternal

protected java.util.Set<Pet> getPetsInternal()

getPets

public java.util.List<Pet> getPets()

addPet

public void addPet(Pet pet)

getPet

public Pet getPet(java.lang.String name)
Return the Pet with the given name, or null if none found for this Owner.

Parameters:
name - to test
Returns:
true if pet name is already in use

getPet

public Pet getPet(java.lang.String name,
                  boolean ignoreNew)
Return the Pet with the given name, or null if none found for this Owner.

Parameters:
name - to test
Returns:
true if pet name is already in use

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2010. All Rights Reserved.