org.springframework.samples.petclinic
Class Owner
java.lang.Object
org.springframework.samples.petclinic.BaseEntity
org.springframework.samples.petclinic.Person
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()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Owner
public Owner()
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.