Class Pet

java.lang.Object
org.apache.juneau.petstore.dto.Pet

public class Pet extends Object
Pet domain bean.

Represents a pet for sale in the petstore.

See Also:
  • Constructor Details

    • Pet

      public Pet()
  • Method Details

    • getId

      public long getId()
      Returns the pet ID.
      Returns:
      The pet ID.
    • setId

      public Pet setId(long value)
      Sets the pet ID.
      Parameters:
      value - The new value.
      Returns:
      This object.
    • getSpecies

      public Species getSpecies()
      Returns the species of the pet.
      Returns:
      The species of the pet.
    • setSpecies

      public Pet setSpecies(Species value)
      Sets the species of the pet.
      Parameters:
      value - The new value.
      Returns:
      This object.
    • getName

      public String getName()
      Returns the name of the pet.
      Returns:
      The name of the pet.
    • setName

      public Pet setName(String value)
      Sets the name of the pet.
      Parameters:
      value - The new value.
      Returns:
      This object.
    • getPrice

      public float getPrice()
      Returns the price of the pet.
      Returns:
      The price of the pet.
    • setPrice

      public Pet setPrice(float value)
      Sets the price of the pet.
      Parameters:
      value - The new value.
      Returns:
      This object.
    • getTags

      public List<String> getTags()
      Returns the tags associated with the pet.
      Returns:
      The tags associated with the pet. Can be null if not set.
    • setTags

      public Pet setTags(List<String> value)
      Sets the tags associated with the pet.
      Parameters:
      value - The new value. Can be null to unset the property.
      Returns:
      This object.
    • getStatus

      public PetStatus getStatus()
      Returns the lifecycle status of the pet.
      Returns:
      The lifecycle status of the pet.
    • setStatus

      public Pet setStatus(PetStatus value)
      Sets the lifecycle status of the pet.
      Parameters:
      value - The new value.
      Returns:
      This object.
    • getPhoto

      public String getPhoto()
      Returns the URI of the pet photo.
      Returns:
      The URI of the pet photo. Can be null if not set.
    • setPhoto

      public Pet setPhoto(String value)
      Sets the URI of the pet photo.
      Parameters:
      value - The new value. Can be null to unset the property.
      Returns:
      This object.
    • defaultSpecies

      public Pet defaultSpecies(Species value)
      Sets the species only if it is currently null.
      Parameters:
      value - The fallback value.
      Returns:
      This object.
    • defaultTags

      public Pet defaultTags(List<String> value)
      Sets the tags only if they are currently null.
      Parameters:
      value - The fallback value.
      Returns:
      This object.
    • defaultStatus

      public Pet defaultStatus(PetStatus value)
      Sets the lifecycle status only if it is currently null.
      Parameters:
      value - The fallback value.
      Returns:
      This object.
    • defaultPhoto

      public Pet defaultPhoto(String value)
      Sets the photo URI only if it is currently null.
      Parameters:
      value - The fallback value.
      Returns:
      This object.