FileDocCategorySizeDatePackage
Bike.javaAPI DocExample2193Mon Apr 25 00:11:04 BST 2005com.springbook

Bike.java

package com.springbook;

import java.util.Set;

public class Bike {
   private int bikeId;
   private String manufacturer;
   private String model;
   private int frame;
   private String serialNo;
   private double weight;
   private String status;
   private Set reservations;

    public Set getReservations() {
        return reservations;
    }

    public void setReservations(Set reservations) {
        this.reservations = reservations;
    }
   
   public Bike() {

   }

   public Bike(String manufacturer, String model, int frame, String serialNo, double weight, String status) {
      this(0, manufacturer, model, frame, serialNo, weight, status);
   }

   public Bike(int id, String manufacturer, String model, int frame, String serialNo, double weight, String status) {
      this.bikeId = id;
      this.manufacturer = manufacturer;
      this.model = model;
      this.frame = frame;
      this.serialNo = serialNo;
      this.weight = weight;
      this.status = status;
   }

   public String toString() {
      return "com.springbook.Bike : (" + bikeId + ") \n" +
            ": manufacturer -- " + manufacturer +
            "\n: model -- " + model +
            "\n: frame -- " + frame +
            "\n: serialNo -- " + serialNo +
            "\n: weight -- " + weight +
            "\n: status -- " + status +
            ".\n"; }

   public String getManufacturer() { return manufacturer; }

   public void setManufacturer(String manufacturer) {
      this.manufacturer = manufacturer;
   }

   public int getBikeId() { return bikeId; }

   public void setBikeId(int id) { this.bikeId = id; }

   public String getModel() { return model; }

   public void setModel(String model) { this.model = model; }

   public int getFrame() { return frame; }

   public void setFrame(int frame) { this.frame = frame; }

   public String getSerialNo() { return serialNo; }

   public void setSerialNo(String serialNo) { this.serialNo = serialNo; }

   public double getWeight() { return weight; }

   public void setWeight(double weight) { this.weight = weight; }

   public String getStatus() { return status; }

   public void setStatus(String status) { this.status = status; }

}