KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > bsf > smartValueObject > demo > SubsidiaryVO


1 package org.bsf.smartValueObject.demo;
2
3 import java.io.Serializable JavaDoc;
4
5 /**
6  * Subsidiary.
7  *
8  * @hibernate.class table="subsidiary"
9  */

10 public class SubsidiaryVO implements Serializable JavaDoc {
11     private Long JavaDoc id;
12     private String JavaDoc name;
13     private long workforce;
14     private CompanyVO companyVO;
15
16     /** @hibernate.id generator-class="native" column="id" unsaved-value="0" */
17     public Long JavaDoc getId() {
18         return id;
19     }
20
21     public void setId(Long JavaDoc id) {
22         this.id = id;
23     }
24
25     /** @hibernate.property column="name" */
26     public String JavaDoc getName() {
27         return name;
28     }
29
30     public void setName(String JavaDoc name) {
31         this.name = name;
32     }
33
34     /** @hibernate.property column="workforce" */
35     public long getWorkforce() {
36         return workforce;
37     }
38
39     public void setWorkforce(long workforce) {
40         this.workforce = workforce;
41     }
42
43     /** @hibernate.many-to-one column="companyId" not-null="true" */
44     public CompanyVO getCompanyVO() {
45         return this.companyVO;
46     }
47
48     public void setCompanyVO(CompanyVO c) {
49         this.companyVO = c;
50     }
51
52     public String JavaDoc toString() {
53         return "SubsidiaryVO: id=" + id + " name=" + name + " workforce=" + workforce;
54     }
55 }
56
Popular Tags