1 25 package org.objectweb.easybeans.tests.common.ejbs.entity.entitytest01; 26 27 import java.io.Serializable ; 28 29 import javax.persistence.Embeddable; 30 import javax.persistence.JoinColumn; 31 import javax.persistence.ManyToOne; 32 33 39 @Embeddable 40 public class RoomPK implements Serializable { 41 42 45 private static final long serialVersionUID = -4342617189420663508L; 46 47 50 private Long roomID; 51 52 55 private Building building; 56 57 61 public Building getBuilding() { 62 return building; 63 } 64 65 69 @ManyToOne 70 @JoinColumn(name = "id") 71 public void setBuilding(final Building building) { 72 this.building = building; 73 } 74 75 79 public Long getRoomID() { 80 return roomID; 81 } 82 83 87 public void setRoomID(final Long roomID) { 88 this.roomID = roomID; 89 } 90 91 } 92 | Popular Tags |