01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one
03: * or more contributor license agreements. See the NOTICE file
04: * distributed with this work for additional information
05: * regarding copyright ownership. The ASF licenses this file
06: * to you under the Apache License, Version 2.0 (the
07: * "License"); you may not use this file except in compliance
08: * with the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing,
13: * software distributed under the License is distributed on an
14: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15: * KIND, either express or implied. See the License for the
16: * specific language governing permissions and limitations
17: * under the License.
18: */
19: package org.apache.openjpa.persistence.jdbc.annotations;
20:
21: import javax.persistence.*;
22:
23: @Entity
24: @DiscriminatorValue("ANNO3")
25: @Table(name="ANNOTEST3")
26: @PrimaryKeyJoinColumns(@PrimaryKeyJoinColumn(name="SUB_PK",referencedColumnName="PK"))
27: public class AnnoTest3 extends AnnoTest1 {
28:
29: @Basic
30: @Column(name="SUBBASIC")
31: protected int basic2;
32:
33: @OneToOne(fetch=FetchType.LAZY)
34: protected AnnoTest2 subOneOne;
35:
36: public AnnoTest3() {
37: }
38:
39: public AnnoTest3(long pk) {
40: super (pk);
41: }
42:
43: public AnnoTest3(Long pk) {
44: super (pk);
45: }
46:
47: public void setBasic2(int i) {
48: basic2 = i;
49: }
50:
51: public int getBasic2() {
52: return basic2;
53: }
54:
55: public AnnoTest2 getSubOneOne() {
56: return subOneOne;
57: }
58:
59: public void setSubOneOne(AnnoTest2 anno2) {
60: subOneOne = anno2;
61: }
62: }
|