01: package example;
02:
03: import javax.persistence.*;
04:
05: /**
06: * Implementation class for the Student bean.
07: *
08: * <code><pre>
09: * CREATE TABLE amber_inherit_student (
10: * id INTEGER PRIMARY KEY auto_increment,
11: * type VARCHAR(10),
12: * name VARCHAR(250),
13: * );
14: * </pre></code>
15: */
16: @Entity
17: @DiscriminatorValue("prefect")
18: public class Prefect extends Student {
19: public Prefect() {
20: }
21:
22: public Prefect(String name) {
23: super (name);
24: }
25:
26: public String toString() {
27: return "Prefect[" + getName() + "]";
28: }
29: }
|