diff options
Diffstat (limited to 'Master/Reference Architectures and Patterns/EJB 3.0 Code/Micah Examples/src/examples/entity/single_table/Motorcycle.java')
| -rw-r--r-- | Master/Reference Architectures and Patterns/EJB 3.0 Code/Micah Examples/src/examples/entity/single_table/Motorcycle.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Micah Examples/src/examples/entity/single_table/Motorcycle.java b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Micah Examples/src/examples/entity/single_table/Motorcycle.java new file mode 100644 index 0000000..018cb5d --- /dev/null +++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Micah Examples/src/examples/entity/single_table/Motorcycle.java @@ -0,0 +1,22 @@ +package examples.entity.single_table;
+
+import java.io.Serializable;
+
+import javax.persistence.DiscriminatorValue;
+import javax.persistence.Entity;
+
+@Entity(name="MotorcycleSingle")
+@DiscriminatorValue("MOTORCYCLE")
+public class Motorcycle extends RoadVehicle implements Serializable {
+ public final AcceleratorType acceleratorType = AcceleratorType.THROTTLE;
+
+ public Motorcycle() {
+ super();
+ numWheels = 2;
+ numPassengers = 2;
+ }
+
+ public String toString() {
+ return "Motorcycle: "+super.toString();
+ }
+}
|
