KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > ejb3 > test > regression > ejbthree440 > model > MyResource


1 package org.jboss.ejb3.test.regression.ejbthree440.model;
2
3 import javax.persistence.DiscriminatorValue;
4 import javax.persistence.Entity;
5 import javax.persistence.Inheritance;
6 import javax.persistence.PrimaryKeyJoinColumn;
7 import javax.persistence.Table;
8
9 /**
10  * This demonstrates entity inheritance.
11  *
12  * @author Ortwin Glück
13  */

14 @Entity
15 @Table(name="TBRESOURCE2")
16 @Inheritance
17 @DiscriminatorValue("M")
18 @PrimaryKeyJoinColumn(name="resource_id")
19 public class MyResource extends Resource {
20   private String JavaDoc myField;
21   
22   public MyResource() {
23     super();
24   }
25
26   public String JavaDoc getMyField() {
27     return myField;
28   }
29
30   public void setMyField(String JavaDoc myField) {
31     this.myField = myField;
32   }
33
34 }
35
Popular Tags