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.query.common.apps;
20:
21: import java.io.Serializable;
22: import javax.persistence.Basic;
23: import javax.persistence.Column;
24: import javax.persistence.Entity;
25: import javax.persistence.Id;
26:
27: //@Entity(name="entity2ExplicitName")
28:
29: //@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
30: /**
31: * FIX-ME
32: * <p/>
33: * It should complain if i uncomment the above strategies...but it does
34: */
35: @Entity
36: public class Entity2 implements Serializable {
37:
38: /**
39: *
40: */
41: private static final long serialVersionUID = 4723739219953167343L;
42:
43: @Id
44: protected long pk;
45:
46: @Basic
47: @Column(length=35)
48: protected String stringField;
49:
50: @Basic
51: protected int intField;
52:
53: public Entity2() {
54: }
55:
56: public Entity2(long pk, String stringField, int intField) {
57: this .pk = pk;
58: this .stringField = stringField;
59: this .intField = intField;
60: }
61:
62: public long getPk() {
63: return pk;
64: }
65:
66: public void setStringField(String val) {
67: stringField = val;
68: }
69:
70: public String getStringField() {
71: return stringField;
72: }
73:
74: public void setIntField(int val) {
75: intField = val;
76: }
77:
78: public int getIntField() {
79: return intField;
80: }
81:
82: public String toString() {
83: return ("PK: " + pk + " StringField: " + stringField
84: + " IntField: " + intField);
85: }
86: }
|