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   * @author Eduardo Macarron
24   */
25  public class Product implements Serializable {
26  
27    /** The serial version uid. */
28    private static final long serialVersionUID = -7492639752670189553L;
29  
30    /** The product id. */
31    private String productId;
32    /** The category id. */
33    private String categoryId;
34    /** The name. */
35    private String name;
36    /** The description. */
37    private String description;
38  
39    /**
40     * Gets the product id.
41     *
42     * @return the product id
43     */
44    public String getProductId() {
45      return productId;
46    }
47  
48    /**
49     * Sets the product id.
50     *
51     * @param productId
52     *          the product id
53     */
54    public void setProductId(String productId) {
55      this.productId = productId.trim();
56    }
57  
58    /**
59     * Gets the category id.
60     *
61     * @return the category id
62     */
63    public String getCategoryId() {
64      return categoryId;
65    }
66  
67    /**
68     * Sets the category id.
69     *
70     * @param categoryId
71     *          the category id
72     */
73    public void setCategoryId(String categoryId) {
74      this.categoryId = categoryId;
75    }
76  
77    /**
78     * Gets the name.
79     *
80     * @return the name
81     */
82    public String getName() {
83      return name;
84    }
85  
86    /**
87     * Sets the name.
88     *
89     * @param name
90     *          the name
91     */
92    public void setName(String name) {
93      this.name = name;
94    }
95  
96    /**
97     * Gets the description.
98     *
99     * @return the description
100    */
101   public String getDescription() {
102     return description;
103   }
104 
105   /**
106    * Sets the description.
107    *
108    * @param description
109    *          the description
110    */
111   public void setDescription(String description) {
112     this.description = description;
113   }
114 
115   @Override
116   public String toString() {
117     return getName();
118   }
119 
120 }