1 22 package org.jboss.ejb3.test.entitycallback; 23 24 import javax.persistence.DiscriminatorColumn; 25 import javax.persistence.DiscriminatorType; 26 import javax.persistence.DiscriminatorValue; 27 import javax.persistence.Entity; 28 import javax.persistence.Inheritance; 29 import javax.persistence.InheritanceType; 30 31 35 @Entity 36 @Inheritance(strategy = InheritanceType.SINGLE_TABLE) 37 @DiscriminatorColumn(discriminatorType = DiscriminatorType.STRING) 38 @DiscriminatorValue("BUS") 39 public class BusJourney extends Journey 40 { 41 private String bus; 42 43 public BusJourney() 44 { 45 46 } 47 48 public BusJourney(String start, String dest, String bus) 49 { 50 super(start, dest); 51 this.bus = bus; 52 } 53 54 55 56 public String getBus() 57 { 58 return bus; 59 } 60 61 public void setBus(String bus) 62 { 63 this.bus = bus; 64 } 65 } 66 | Popular Tags |