From 33613a85afc4b1481367fbe92a17ee59c240250b Mon Sep 17 00:00:00 2001 From: Sven Eisenhauer Date: Fri, 10 Nov 2023 15:11:48 +0100 Subject: add new repo --- .../src/examples/entity/single_table/Coupe.java | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Master/Reference Architectures and Patterns/EJB 3.0 Code/Micah Examples/src/examples/entity/single_table/Coupe.java (limited to 'Master/Reference Architectures and Patterns/EJB 3.0 Code/Micah Examples/src/examples/entity/single_table/Coupe.java') diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Micah Examples/src/examples/entity/single_table/Coupe.java b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Micah Examples/src/examples/entity/single_table/Coupe.java new file mode 100644 index 0000000..31af7d5 --- /dev/null +++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Micah Examples/src/examples/entity/single_table/Coupe.java @@ -0,0 +1,31 @@ +package examples.entity.single_table; + +import java.io.Serializable; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +@Entity(name="CoupeSingle") +@DiscriminatorValue("COUPE") +public class Coupe extends Car implements Serializable { + public enum BoringFactor {BORING,BORINGER,BORINGEST}; + + private BoringFactor boringFactor; + + public Coupe() { + super(); + numPassengers = 5; + } + + public BoringFactor getBoringFactor() { + return boringFactor; + } + + public void setBoringFactor(BoringFactor boringFactor) { + this.boringFactor = boringFactor; + } + + public String toString() { + return "Coupe: "+super.toString(); + } +} -- cgit v1.2.3