1 package example; 2 3 import javax.persistence.Basic; 4 import javax.persistence.Column; 5 import javax.persistence.Entity; 6 import javax.persistence.GeneratedValue; 7 import javax.persistence.Id; 8 import javax.persistence.Table; 9 10 24 @Entity 25 @Table(name="ejb3_basic_courses") 26 public class CourseBean { 27 private int _id; 28 private String _course; 29 private String _teacher; 30 31 34 @Id 35 @Column(name="id") 36 @GeneratedValue 37 public int getId() 38 { 39 return _id; 40 } 41 42 public void setId(int id) 43 { 44 _id = id; 45 } 46 47 50 @Basic 51 public String getCourse() 52 { 53 return _course; 54 } 55 56 59 public void setCourse(String course) 60 { 61 _course = course; 62 } 63 64 67 @Basic 68 public String getTeacher() 69 { 70 return _teacher; 71 } 72 73 76 public void setTeacher(String teacher) 77 { 78 _teacher = teacher; 79 } 80 } 81 | Popular Tags |