View Javadoc

1   /*
2    * Copyright 2004 Carlos Sanchez.
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    *      http://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 net.sf.oness.inventory.model.product.bo;
17  
18  import java.util.ArrayList;
19  import java.util.Collection;
20  
21  import net.sf.oness.common.model.bo.AbstractBusinessObject;
22  
23  /***
24   * @hibernate.class table="size"
25   * 
26   * @author Carlos Sanchez
27   * @version $Revision: 1.4 $
28   */
29  public class Size extends AbstractBusinessObject {
30  
31      private String name;
32  
33      private int position;
34  
35      private Collection sizeGroups = new ArrayList();
36  
37      /***
38       * @param name
39       *            The name to set.
40       */
41      public void setName(String name) {
42          this.name = name;
43      }
44  
45      /***
46       * @hibernate.property 
47       * 
48       * @return Returns the name.
49       */
50      public String getName() {
51          return name;
52      }
53  
54      /***
55       * @param position
56       *            The position to set.
57       */
58      public void setPosition(int position) {
59          this.position = position;
60      }
61  
62      /***
63       * Position of the size in the list of sizes from a sizeGroup
64       * 
65       * @hibernate.property
66       * 
67       * @return Returns the position.
68       */
69      public int getPosition() {
70          return position;
71      }
72  
73      /***
74       * @param sizeGroups
75       *            The sizeGroups to set.
76       */
77      public void setSizeGroups(Collection sizeGroups) {
78          this.sizeGroups = sizeGroups;
79      }
80  
81      /***
82       * @hibernate.bag table="sizegroup_size" lazy="true" inverse="true" order-by="sizegroup_id desc"
83       * @hibernate.collection-key column="size_id"
84       * @hibernate.collection-many-to-many column="sizegroup_id" class="net.sf.oness.inventory.model.product.bo.SizeGroup"
85       * 
86       * @return Returns the sizeGroups.
87       */
88      public Collection getSizeGroups() {
89          return sizeGroups;
90      }
91  
92  }