1 25 package org.objectweb.easybeans.tests.common.ejbs.entity.entitytest04; 26 27 import java.io.Serializable ; 28 29 import javax.persistence.Basic; 30 import javax.persistence.Entity; 31 import javax.persistence.FetchType; 32 import javax.persistence.Id; 33 import javax.persistence.OneToOne; 34 35 40 @Entity 41 public class ProfessorRoom implements Serializable { 42 43 46 private static final long serialVersionUID = 4584689820008347097L; 47 48 51 private String name; 52 53 56 private Long id; 57 58 61 private Professor professor; 62 63 67 @OneToOne(mappedBy = "professorRoom") 68 public Professor getProfessor() { 69 return professor; 70 } 71 72 76 public void setProfessor(final Professor professor) { 77 this.professor = professor; 78 } 79 80 84 @Id 85 public Long getId() { 86 return id; 87 } 88 89 93 public void setId(final Long id) { 94 this.id = id; 95 } 96 97 101 @Basic(fetch = FetchType.LAZY) 102 public String getName() { 103 return name; 104 } 105 106 110 public void setName(final String name) { 111 this.name = name; 112 } 113 114 } 115 | Popular Tags |