diff --git a/.gitignore b/.gitignore index 4f94b89..d6b5245 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .idea/* *.iml -target/* \ No newline at end of file +target/* +javadoc/* \ No newline at end of file diff --git a/src/main/java/nl/andrewlalis/teaching_assistant_assistant/controllers/package-info.java b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/controllers/package-info.java new file mode 100644 index 0000000..fbd43a1 --- /dev/null +++ b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/controllers/package-info.java @@ -0,0 +1,10 @@ +/** + * Contains all page and action controllers which respond to requests on the website. + * + *
+ * Each class defined here should therefore be annotated with Spring's @Controller
annotation, and
+ * define one or more methods annotated with a @RequestMapping
(or any convenience shortcut) to respond
+ * to requests to the controller.
+ *
+ * The basic entity properties which any entity in this system should have: an {@code id} and a creation timestamp. + * Every entity in this system should extend from BasicEntity. + *
+ * + *+ * Every single entity in this system therefore is identified uniquely by a Long primary key, although it may also + * be identified by other codes or attributes defined in such an entity. For example, the {@link Course} object has + * a unique code, which can also be used to select a course. + *
+ * */ @MappedSuperclass public abstract class BasicEntity { + /** + * The primary key for any basic entity. + */ @Id @GeneratedValue( strategy = GenerationType.IDENTITY ) private Long id; + /** + * The date at which this basic entity was created. + */ @Temporal( value = TemporalType.TIMESTAMP ) diff --git a/src/main/java/nl/andrewlalis/teaching_assistant_assistant/model/package-info.java b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/model/package-info.java new file mode 100644 index 0000000..c551228 --- /dev/null +++ b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/model/package-info.java @@ -0,0 +1,14 @@ +/** + * Contains all persistent entities that make up the core data model for the application. + * + *+ * All model objects should ultimately extend from {@link nl.andrewlalis.teaching_assistant_assistant.model.BasicEntity} + * and define new attributes as necessary for use. + *
+ * + *
+ * From BasicEntity it is implied that all entities contained herein can be identified uniquely by at least a
+ * Long id
.
+ *
+ * A Person may belong to many {@link Team}s and may also belong to many {@link Course}s, irrespective of Team + * involvement. + *
*/ @Entity @Table(name = "people") diff --git a/src/main/java/nl/andrewlalis/teaching_assistant_assistant/model/people/teams/Team.java b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/model/people/teams/Team.java index c121694..9084aae 100644 --- a/src/main/java/nl/andrewlalis/teaching_assistant_assistant/model/people/teams/Team.java +++ b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/model/people/teams/Team.java @@ -9,9 +9,11 @@ import java.util.ArrayList; import java.util.List; /** - * A group consisting of one or more members. Child classes should define P as a sub class of Person to define custom - * behavior if needed. - * @paramThe type of members this group contains. + * A group consisting of one or more members that belongs to a {@link Course}. + * + *
+ * Any Team contains a collection of {@link Person} objects, each representing a member of the team. + *
*/ @Entity @Inheritance( diff --git a/src/main/java/nl/andrewlalis/teaching_assistant_assistant/model/repositories/package-info.java b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/model/repositories/package-info.java new file mode 100644 index 0000000..397dd86 --- /dev/null +++ b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/model/repositories/package-info.java @@ -0,0 +1,5 @@ +/** + * A collection of {@link org.springframework.data.repository.CrudRepository} repositories that are used to access key + * components of the {@code nl.andrewlalis.teaching_assistant_assistant.model} package. + */ +package nl.andrewlalis.teaching_assistant_assistant.model.repositories; \ No newline at end of file