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.cache.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: import javax.persistence.Inheritance;
27: import javax.persistence.InheritanceType;
28:
29: //@Entity(name="entity2ExplicitName")
30: @Entity
31: @Inheritance(strategy=InheritanceType.SINGLE_TABLE)
32: public class Entity2 implements Serializable {
33:
34: /**
35: *
36: */
37: private static final long serialVersionUID = 4723739219953167343L;
38:
39: @Id
40: protected long pk;
41:
42: @Basic
43: @Column(length=35)
44: protected String stringField;
45:
46: @Basic
47: protected int intField;
48:
49: public Entity2() {
50: }
51:
52: public Entity2(long pk, String stringField, int intField) {
53: this .pk = pk;
54: this .stringField = stringField;
55: this .intField = intField;
56: }
57:
58: public long getPk() {
59: return pk;
60: }
61:
62: public void setStringField(String val) {
63: stringField = val;
64: }
65:
66: public String getStringField() {
67: return stringField;
68: }
69:
70: public void setIntField(int val) {
71: intField = val;
72: }
73:
74: public int getIntField() {
75: return intField;
76: }
77:
78: public String toString() {
79: return ("PK: " + pk + " StringField: " + stringField
80: + " IntField: " + intField);
81: }
82: }
|