1 25 package org.objectweb.easybeans.tests.common.ejbs.entity.entitytest00; 26 27 import javax.persistence.AttributeOverride; 28 import javax.persistence.AttributeOverrides; 29 import javax.persistence.Column; 30 import javax.persistence.DiscriminatorValue; 31 import javax.persistence.Entity; 32 import javax.persistence.Table; 33 import javax.persistence.UniqueConstraint; 34 35 41 @Entity 42 @DiscriminatorValue("Student") 43 @Table(name = "STUDENT", uniqueConstraints = @UniqueConstraint(columnNames = {"email"})) 44 @AttributeOverrides({ 45 @AttributeOverride(name="startDate", column = @Column(name = "StudentStartDate")), 46 @AttributeOverride(name="endDate", column = @Column(name = "StudentEndDate")) 47 }) 48 public class Student extends Person { 49 50 53 private static final long serialVersionUID = -7986846870958654109L; 54 55 58 private boolean graduated; 59 60 63 private String email; 64 65 66 70 public String getEmail() { 71 return email; 72 } 73 74 78 public void setEmail(final String email) { 79 this.email = email; 80 } 81 82 86 public boolean isGraduated() { 87 return graduated; 88 } 89 90 94 public void setGraduated(final boolean graduated) { 95 this.graduated = graduated; 96 } 97 98 } 99 | Popular Tags |