1 25 package org.objectweb.easybeans.tests.common.ejbs.entity.entitytest03; 26 27 import java.util.List ; 28 29 import javax.persistence.GeneratedValue; 30 import javax.persistence.GenerationType; 31 import javax.persistence.Id; 32 import javax.persistence.ManyToMany; 33 import javax.persistence.MappedSuperclass; 34 35 41 @MappedSuperclass 42 public class Program { 43 44 47 private Long programId; 48 49 52 private String name; 53 54 57 private List <Course> courses; 58 59 63 @ManyToMany 64 public List <Course> getCourses() { 65 return courses; 66 } 67 68 72 public void setCourses(final List <Course> courses) { 73 this.courses = courses; 74 } 75 76 80 public String getName() { 81 return name; 82 } 83 84 88 public void setName(final String name) { 89 this.name = name; 90 } 91 92 96 @Id 97 @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "PROGRAM_SEQ") 98 public Long getProgramId() { 99 return programId; 100 } 101 102 106 public void setProgramId(final Long programId) { 107 this.programId = programId; 108 } 109 110 } 111 | Popular Tags |