summaryrefslogtreecommitdiffstats
path: root/Master/Reference Architectures and Patterns/EJB 3.0 Code/Micah Examples/src/examples/entity/uni/many_to_many/Course.java
diff options
context:
space:
mode:
Diffstat (limited to 'Master/Reference Architectures and Patterns/EJB 3.0 Code/Micah Examples/src/examples/entity/uni/many_to_many/Course.java')
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Micah Examples/src/examples/entity/uni/many_to_many/Course.java44
1 files changed, 44 insertions, 0 deletions
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Micah Examples/src/examples/entity/uni/many_to_many/Course.java b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Micah Examples/src/examples/entity/uni/many_to_many/Course.java
new file mode 100644
index 0000000..b922a7d
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Micah Examples/src/examples/entity/uni/many_to_many/Course.java
@@ -0,0 +1,44 @@
+package examples.entity.uni.many_to_many;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collection;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+@Entity(name="CourseUni")
+public class Course implements Serializable {
+ private int id;
+ private String courseName;
+ private Collection<Student> students = new ArrayList<Student>();
+
+ public Course() {
+ id = (int)System.nanoTime();
+ }
+
+ @Id
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public String getCourseName() {
+ return courseName;
+ }
+
+ public void setCourseName(String courseName) {
+ this.courseName = courseName;
+ }
+
+ public Collection<Student> getStudents() {
+ return students;
+ }
+
+ public void setStudents(Collection<Student> students) {
+ this.students = students;
+ }
+}