1 25 package org.objectweb.easybeans.tests.common.ejbs.entity.entitytest00; 26 27 import javax.persistence.DiscriminatorValue; 28 import javax.persistence.Embedded; 29 import javax.persistence.Entity; 30 import javax.persistence.EnumType; 31 import javax.persistence.Enumerated; 32 import javax.persistence.SecondaryTable; 33 import javax.persistence.SecondaryTables; 34 import javax.persistence.Transient; 35 36 42 @Entity 43 @DiscriminatorValue("technician") 44 @SecondaryTables({@SecondaryTable(name = "technicianDetails"), @SecondaryTable(name = "bankingData")}) 45 public class Technician extends Person { 46 47 50 private static final long serialVersionUID = -1732670933017289750L; 51 52 58 public enum ContractType {CDD, CDI, INTERNSHIP} 59 60 63 private String place; 64 65 68 private ContractType contract; 69 70 73 private Telephone phone; 74 75 76 80 @Embedded 81 public Telephone getPhone() { 82 return phone; 83 } 84 85 89 public void setPhone(final Telephone phone) { 90 this.phone = phone; 91 } 92 96 @Enumerated(EnumType.ORDINAL) 97 public ContractType getContract() { 98 return contract; 99 } 100 101 105 public void setContract(final ContractType contract) { 106 this.contract = contract; 107 } 108 109 113 @Transient 114 public String getPlace() { 115 return place; 116 } 117 118 122 public void setPlace(final String place) { 123 this.place = place; 124 } 125 126 } 127 | Popular Tags |