KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > samples > jpetstore > domain > Product


1 package org.springframework.samples.jpetstore.domain;
2
3 import java.io.Serializable JavaDoc;
4
5
6 public class Product implements Serializable JavaDoc {
7
8   /* Private Fields */
9
10   private String JavaDoc productId;
11   private String JavaDoc categoryId;
12   private String JavaDoc name;
13   private String JavaDoc description;
14
15   /* JavaBeans Properties */
16
17   public String JavaDoc getProductId() { return productId; }
18   public void setProductId(String JavaDoc productId) { this.productId = productId.trim(); }
19
20   public String JavaDoc getCategoryId() { return categoryId; }
21   public void setCategoryId(String JavaDoc categoryId) { this.categoryId = categoryId; }
22
23   public String JavaDoc getName() { return name; }
24   public void setName(String JavaDoc name) { this.name = name; }
25
26   public String JavaDoc getDescription() { return description; }
27   public void setDescription(String JavaDoc description) { this.description = description; }
28
29   /* Public Methods*/
30
31   public String JavaDoc toString() {
32     return getName();
33   }
34
35 }
36
Popular Tags