1 package ejava.examples.orm.inheritance.annotated;
2
3 import javax.persistence.*;
4
5
6
7
8
9
10
11
12
13 @Entity @Table(name="ORMINH_CIRCLE")
14 public class Circle extends Shape {
15 private int radius;
16
17 @Transient
18 public String getName() {
19 return "circle:" + getId();
20 }
21
22 public int getRadius() {
23 return radius;
24 }
25 public void setRadius(int radius) {
26 this.radius = radius;
27 }
28
29 public String toString() {
30 StringBuilder text = new StringBuilder(super.toString());
31 text.append(", radius=" + radius);
32 return text.toString();
33 }
34 }