1 7 package org.jboss.tutorial.joininheritance.bean; 8 9 import javax.persistence.Entity; 10 import javax.persistence.GeneratorType; 11 import javax.persistence.Id; 12 import javax.persistence.Inheritance; 13 import javax.persistence.GeneratorType; 14 import javax.persistence.InheritanceType; 15 import javax.persistence.Entity; 16 17 @Entity 18 @Inheritance(strategy = InheritanceType.JOINED) 19 public class Pet implements java.io.Serializable 20 { 21 private int id; 22 private String name; 23 private double weight; 24 25 @Id(generate = GeneratorType.AUTO) 26 public int getId() 27 { 28 return id; 29 } 30 31 public void setId(int id) 32 { 33 this.id = id; 34 } 35 36 public String getName() 37 { 38 return name; 39 } 40 41 public void setName(String name) 42 { 43 this.name = name; 44 } 45 46 public double getWeight() 47 { 48 return weight; 49 } 50 51 public void setWeight(double weight) 52 { 53 this.weight = weight; 54 } 55 } 56 | Popular Tags |