KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > test > legacy > ComponentNotNullMaster


1 //$Id: ComponentNotNullMaster.java,v 1.1 2004/09/26 05:18:25 oneovthafew Exp $
2
package org.hibernate.test.legacy;
3
4 import java.util.List JavaDoc;
5
6 /**
7  * Entity containing components for not-null testing
8  *
9  * @author Emmanuel Bernard
10  */

11 public class ComponentNotNullMaster {
12     
13     private int id;
14     private String JavaDoc test;
15     private ComponentNotNull nullable;
16     private ComponentNotNull supercomp;
17     private List JavaDoc components;
18     private List JavaDoc componentsImplicit;
19
20     public int getId() {
21         return id;
22     }
23
24     public ComponentNotNull getNullable() {
25         return nullable;
26     }
27
28     public void setId(int i) {
29         id = i;
30     }
31
32     public void setNullable(ComponentNotNull component) {
33         nullable = component;
34     }
35
36     public static final class ContainerInnerClass {
37         private Simple simple;
38         private String JavaDoc name;
39         private One one;
40         private Many many;
41         private int count;
42         private ContainerInnerClass nested;
43         private String JavaDoc nestedproperty;
44         
45         public void setSimple(Simple simple) {
46             this.simple = simple;
47         }
48         
49         public Simple getSimple() {
50             return simple;
51         }
52
53         public String JavaDoc getName() {
54             return name;
55         }
56         
57
58         public void setName(String JavaDoc name) {
59             this.name = name;
60         }
61         
62         public String JavaDoc toString() {
63             return name + " = " + simple.getCount() +
64              "/" + ( one==null ? "nil" : one.getKey().toString() ) +
65              "/" + ( many==null ? "nil" : many.getKey().toString() );
66         }
67         
68         public One getOne() {
69             return one;
70         }
71         
72         public void setOne(One one) {
73             this.one = one;
74         }
75         
76         public Many getMany() {
77             return many;
78         }
79
80         public void setMany(Many many) {
81             this.many = many;
82         }
83         
84         public int getCount() {
85             return count;
86         }
87
88         public void setCount(int count) {
89             this.count = count;
90         }
91
92         public ContainerInnerClass getNested() {
93             return nested;
94         }
95
96         public void setNested(ContainerInnerClass class1) {
97             nested = class1;
98         }
99
100         public String JavaDoc getNestedproperty() {
101             return nestedproperty;
102         }
103
104         public void setNestedproperty(String JavaDoc string) {
105             nestedproperty = string;
106         }
107
108     }
109
110     public List JavaDoc getComponents() {
111         return components;
112     }
113
114     public void setComponents(List JavaDoc list) {
115         components = list;
116     }
117
118     public List JavaDoc getComponentsImplicit() {
119         return componentsImplicit;
120     }
121
122     public void setComponentsImplicit(List JavaDoc list) {
123         componentsImplicit = list;
124     }
125
126     public ComponentNotNull getSupercomp() {
127         return supercomp;
128     }
129
130     public void setSupercomp(ComponentNotNull component) {
131         supercomp = component;
132     }
133
134     public String JavaDoc getTest() {
135         return test;
136     }
137
138     public void setTest(String JavaDoc string) {
139         test = string;
140     }
141
142 }
143
Popular Tags