org.springframework.samples.petportal.domain
Class Pet

java.lang.Object
  extended by org.springframework.samples.petportal.domain.Pet
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class Pet
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable

A simple domain object representing a Pet.

Author:
John A. Lewis, Mark Fisher
See Also:
Serialized Form

Constructor Summary
Pet()
           
Pet(java.lang.String species, java.lang.String breed, java.lang.String name, java.util.Date birthdate)
           
 
Method Summary
 int compareTo(java.lang.Object obj)
           
 boolean equals(java.lang.Object obj)
           
 java.util.Date getBirthdate()
          Get the Pet's birthdate.
 java.lang.String getBreed()
          Get the Pet's breed.
 java.lang.String getDescription()
          Get the Pet's description
 java.lang.Integer getKey()
          Get the Pet's key.
 java.lang.String getName()
          Get the Pet's name.
 java.lang.String getSpecies()
          Get the Pet's species.
 int hashCode()
           
 void setBirthdate(java.util.Date birthdate)
          Set the Pet's birthdate.
 void setBreed(java.lang.String breed)
          Set the Pet's breed.
 void setDescription(java.lang.String description)
          Set the Pet's description.
 void setKey(java.lang.Integer key)
          Set the Pet's key.
 void setName(java.lang.String name)
          Set the Pet's name.
 void setSpecies(java.lang.String species)
          Set the Pet's species.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Pet

public Pet()

Pet

public Pet(java.lang.String species,
           java.lang.String breed,
           java.lang.String name,
           java.util.Date birthdate)
Method Detail

getName

public java.lang.String getName()
Get the Pet's name.

Returns:
name

setName

public void setName(java.lang.String name)
Set the Pet's name.


getSpecies

public java.lang.String getSpecies()
Get the Pet's species.

Returns:
species

setSpecies

public void setSpecies(java.lang.String species)
Set the Pet's species.


getBreed

public java.lang.String getBreed()
Get the Pet's breed.

Returns:
breed

setBreed

public void setBreed(java.lang.String breed)
Set the Pet's breed.


getBirthdate

public java.util.Date getBirthdate()
Get the Pet's birthdate.

Returns:
birthdate

setBirthdate

public void setBirthdate(java.util.Date birthdate)
Set the Pet's birthdate.


getDescription

public java.lang.String getDescription()
Get the Pet's description

Returns:
description

setDescription

public void setDescription(java.lang.String description)
Set the Pet's description.


getKey

public java.lang.Integer getKey()
Get the Pet's key.

Returns:
key

setKey

public void setKey(java.lang.Integer key)
Set the Pet's key.


compareTo

public int compareTo(java.lang.Object obj)
Specified by:
compareTo in interface java.lang.Comparable

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

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


John A. Lewis, Mark Fisher, Juergen Hoeller - 2007.