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.warehouse.bo;
17  
18  import java.util.Collection;
19  
20  import net.sf.oness.common.model.bo.AbstractBusinessObject;
21  
22  /***
23   * @hibernate.class table="warehouse"
24   * 
25   * @author Carlos Sanchez
26   * @version $Revision: 1.3 $
27   */
28  public class Warehouse extends AbstractBusinessObject {
29  
30      private String name;
31  
32      private Collection stocks;
33  
34      /***
35       * @param name
36       *            The name to set.
37       */
38      public void setName(String name) {
39          this.name = name;
40      }
41  
42      /***
43       * @hibernate.property
44       * 
45       * @return Returns the name.
46       */
47      public String getName() {
48          return name;
49      }
50  
51      /***
52       * @param stocks
53       *            The stocks to set.
54       */
55      public void setStocks(Collection stocks) {
56          this.stocks = stocks;
57      }
58  
59      /***
60       * @hibernate.bag table="warehouse_stock" lazy="true"
61       * @hibernate.collection-key column="warehouse_id"
62       * @hibernate.collection-many-to-many column="stock_id" class="net.sf.oness.inventory.model.warehouse.bo.Stock"
63       * 
64       * @return Returns the stocks.
65       */
66      public Collection getStocks() {
67          return stocks;
68      }
69  
70  }