import java.io.*;

/*
    This class represents a single movie from
    the database.  It implements the minimum requirements
    to be a bean.
*/
public class Movie implements Serializable {

  // Unique title_id
  private int title_id = -1;
  // String representation of movie
  private String name = new String("");
  // price of movie
  private double price = 0.0;
  // quantity in stock
  private int quantity = 0;
  // code that maps to the category table
  private int category = 0;

  // Method Name: Category()
  // Purpose: deafult constructor
  public Movie() {

  }

  // Method Name: setTitleId()
  // Purpose: Access used to set the title id
  public void setTitleId(int value) {

    title_id = value;
  }

  // Method Name: getTitleId()
  // Purpose: Access used to get the title id
  public int getTitleId() {

    return title_id;
  }

  // Method Name: setName()
  // Purpose: Access used to set the title name
  public void setName(String value) {

    if ( value != null ) {

      name = value;
    }
  }

  // Method Name: getName()
  // Purpose: Access used to get the title name
  public String getName() {

    return name;
  }

  // Method Name: setPrice()
  // Purpose: Access used to set the price
  public void setPrice(double value) {

    price = value;
  }

  // Method Name: getPrice()
  // Purpose: Access used to get the price
  public double getPrice() {

    return price;
  }

  // Method Name: setQuantity()
  // Purpose: Access used to set the quantity
  public void setQuantity(int value) {

    quantity = value;
  }

  // Method Name: getQuantity()
  // Purpose: Access used to get the quantity
  public int getQuantity() {

    return quantity;
  }

  // Method Name: setCategory()
  // Purpose: Access used to set the category id
  public void setCategory(int value) {

    category = value;
  }

  // Method Name: getCategory()
  // Purpose: Access used to get the category id
  public int getCategory() {

    return category;
  }
}
