Added even better javadoc.

This commit is contained in:
Andrew Lalis 2019-05-11 09:17:22 +02:00 committed by andrewlalis
parent 28c7eaa261
commit 1f115f8c3f
7 changed files with 59 additions and 6 deletions

3
.gitignore vendored
View File

@ -1,3 +1,4 @@
.idea/* .idea/*
*.iml *.iml
target/* target/*
javadoc/*

View File

@ -0,0 +1,10 @@
/**
* Contains all page and action controllers which respond to requests on the website.
*
* <p>
* Each class defined here should therefore be annotated with Spring's <code>@Controller</code> annotation, and
* define one or more methods annotated with a <code>@RequestMapping</code> (or any convenience shortcut) to respond
* to requests to the controller.
* </p>
*/
package nl.andrewlalis.teaching_assistant_assistant.controllers;

View File

@ -6,18 +6,34 @@ import javax.persistence.*;
import java.util.Date; import java.util.Date;
/** /**
* The basic entity properties which any entity in this system should have: an id and a creation timestamp. Every entity * An abstract object from which all persistent objects in this application should extend.
* in this system should extend from BasicEntity. * <p>
* 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.
* </p>
*
* <p>
* 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.
* </p>
*
*/ */
@MappedSuperclass @MappedSuperclass
public abstract class BasicEntity { public abstract class BasicEntity {
/**
* The primary key for any basic entity.
*/
@Id @Id
@GeneratedValue( @GeneratedValue(
strategy = GenerationType.IDENTITY strategy = GenerationType.IDENTITY
) )
private Long id; private Long id;
/**
* The date at which this basic entity was created.
*/
@Temporal( @Temporal(
value = TemporalType.TIMESTAMP value = TemporalType.TIMESTAMP
) )

View File

@ -0,0 +1,14 @@
/**
* Contains all persistent entities that make up the core data model for the application.
*
* <p>
* All model objects should ultimately extend from {@link nl.andrewlalis.teaching_assistant_assistant.model.BasicEntity}
* and define new attributes as necessary for use.
* </p>
*
* <p>
* From BasicEntity it is implied that all entities contained herein can be identified uniquely by at least a
* <code>Long id</code>.
* </p>
*/
package nl.andrewlalis.teaching_assistant_assistant.model;

View File

@ -10,6 +10,11 @@ import java.util.List;
/** /**
* Represents any person (teaching assistant, student, or other) that exists in this application. * Represents any person (teaching assistant, student, or other) that exists in this application.
*
* <p>
* A Person may belong to many {@link Team}s and may also belong to many {@link Course}s, irrespective of Team
* involvement.
* </p>
*/ */
@Entity @Entity
@Table(name = "people") @Table(name = "people")

View File

@ -9,9 +9,11 @@ import java.util.ArrayList;
import java.util.List; 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 * A group consisting of one or more members that belongs to a {@link Course}.
* behavior if needed. *
* @param <P> The type of members this group contains. * <p>
* Any Team contains a collection of {@link Person} objects, each representing a member of the team.
* </p>
*/ */
@Entity @Entity
@Inheritance( @Inheritance(

View File

@ -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;