Item.java
上传用户:jiancairen
上传日期:2007-08-27
资源大小:26458k
文件大小:2k
源码类别:

Java编程

开发平台:

Java

  1. package org.springframework.samples.jpetstore.domain;
  2. import java.io.Serializable;
  3. public class Item implements Serializable {
  4.   /* Private Fields */
  5.   private String itemId;
  6.   private String productId;
  7.   private double listPrice;
  8.   private double unitCost;
  9.   private int supplierId;
  10.   private String status;
  11.   private String attribute1;
  12.   private String attribute2;
  13.   private String attribute3;
  14.   private String attribute4;
  15.   private String attribute5;
  16.   private Product product;
  17.   private int quantity;
  18.   /* JavaBeans Properties */
  19.   public String getItemId() { return itemId; }
  20.   public void setItemId(String itemId) { this.itemId = itemId.trim(); }
  21.   public int getQuantity() { return quantity; }
  22.   public void setQuantity(int quantity) { this.quantity = quantity; }
  23.   public Product getProduct() { return product; }
  24.   public void setProduct(Product product) { this.product = product; }
  25.   public String getProductId() { return productId; }
  26.   public void setProductId(String productId) { this.productId = productId; }
  27.   public int getSupplierId() { return supplierId; }
  28.   public void setSupplierId(int supplierId) { this.supplierId = supplierId; }
  29.   public double getListPrice() { return listPrice; }
  30.   public void setListPrice(double listPrice) { this.listPrice = listPrice; }
  31.   public double getUnitCost() { return unitCost; }
  32.   public void setUnitCost(double unitCost) { this.unitCost = unitCost; }
  33.   public String getStatus() { return status; }
  34.   public void setStatus(String status) { this.status = status; }
  35.   public String getAttribute1() { return attribute1; }
  36.   public void setAttribute1(String attribute1) { this.attribute1 = attribute1; }
  37.   public String getAttribute2() { return attribute2; }
  38.   public void setAttribute2(String attribute2) { this.attribute2 = attribute2; }
  39.   public String getAttribute3() { return attribute3; }
  40.   public void setAttribute3(String attribute3) { this.attribute3 = attribute3; }
  41.   public String getAttribute4() { return attribute4; }
  42.   public void setAttribute4(String attribute4) { this.attribute4 = attribute4; }
  43.   public String getAttribute5() { return attribute5; }
  44.   public void setAttribute5(String attribute5) { this.attribute5 = attribute5; }
  45.   /* Public Methods */
  46.   public String toString() {
  47.     return "(" + getItemId().trim() + "-" + getProductId().trim() + ")";
  48.   }
  49. }