View Javadoc
1   /*
2    *    Copyright 2010-2026 the original author or authors.
3    *
4    *    Licensed under the Apache License, Version 2.0 (the "License");
5    *    you may not use this file except in compliance with the License.
6    *    You may obtain a copy of the License at
7    *
8    *       https://www.apache.org/licenses/LICENSE-2.0
9    *
10   *    Unless required by applicable law or agreed to in writing, software
11   *    distributed under the License is distributed on an "AS IS" BASIS,
12   *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *    See the License for the specific language governing permissions and
14   *    limitations under the License.
15   */
16  package org.mybatis.jpetstore.domain;
17  
18  import java.io.Serializable;
19  
20  /**
21   * The Class Product.
22   */
23  public class Product implements Serializable {
24  
25    /** The serial version uid. */
26    private static final long serialVersionUID = -7492639752670189553L;
27  
28    /** The product id. */
29    private String productId;
30    /** The category id. */
31    private String categoryId;
32    /** The name. */
33    private String name;
34    /** The description. */
35    private String description;
36  
37    /**
38     * Gets the product id.
39     *
40     * @return the product id
41     */
42    public String getProductId() {
43      return productId;
44    }
45  
46    /**
47     * Sets the product id.
48     *
49     * @param productId
50     *          the product id
51     */
52    public void setProductId(String productId) {
53      this.productId = productId.trim();
54    }
55  
56    /**
57     * Gets the category id.
58     *
59     * @return the category id
60     */
61    public String getCategoryId() {
62      return categoryId;
63    }
64  
65    /**
66     * Sets the category id.
67     *
68     * @param categoryId
69     *          the category id
70     */
71    public void setCategoryId(String categoryId) {
72      this.categoryId = categoryId;
73    }
74  
75    /**
76     * Gets the name.
77     *
78     * @return the name
79     */
80    public String getName() {
81      return name;
82    }
83  
84    /**
85     * Sets the name.
86     *
87     * @param name
88     *          the name
89     */
90    public void setName(String name) {
91      this.name = name;
92    }
93  
94    /**
95     * Gets the description.
96     *
97     * @return the description
98     */
99    public String getDescription() {
100     return description;
101   }
102 
103   /**
104    * Sets the description.
105    *
106    * @param description
107    *          the description
108    */
109   public void setDescription(String description) {
110     this.description = description;
111   }
112 
113   @Override
114   public String toString() {
115     return getName();
116   }
117 
118 }