Commit 8d484456 authored by Arne Styve's avatar Arne Styve
Browse files

Fixed some of the JavaDoc to be able to generate the JavaDoc for the project.

parent a80d8b47
......@@ -4,4 +4,5 @@ addressbook.dat
/vpproject/
/Contacts.vpdm/
/derby.log
/contactsdb/
\ No newline at end of file
/contactsdb/
/doc/
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="FrameworkDetectionExcludesConfiguration" detection-enabled="false" />
<component name="JavadocGenerationManager">
<option name="OUTPUT_DIRECTORY" value="$PROJECT_DIR$/doc" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8.0_201" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
......
......@@ -4,6 +4,10 @@ import java.io.Serializable;
import java.util.Collection;
import java.util.Iterator;
/**
* Defines the interface to an address book. Provides methods for adding contacts,
* deleting contacts and iterating over contacts.
*/
public interface AddressBook extends Serializable, Iterable<ContactDetails> {
/**
......
......@@ -10,22 +10,22 @@ import javax.persistence.Query;
/**
* An addressbook holding contacts, stored in a relational database, implemented using
* <p>An addressbook holding contacts, stored in a relational database, implemented using
* the JPA implementation EclipseLink.
* Using the JPA standard for Object Relational Mapping (ORM) removes database specifics
* from the Java code, and hides the underlying RDB solution, making it easy to change between
* different suppliers of Relational Database management Systems (RDBMS), and between locally
* embedded database and server based database systems.
* JPA makes use of <b>EntityManager</b> (EMF) and <b>EntityManagerFactory</b> (EM) classes for
* communication with the underlying RDBMS. Creating an EntityManagerFactory instance is costly:
* </p>
* (<a href="https://docs.jboss.org/hibernate/entitymanager/3.5/reference/en/html_single/#d0e980">
* communication with the underlying RDBMS. Creating an EntityManagerFactory instance is costly:</p>
*
* <p>(<a href="https://docs.jboss.org/hibernate/entitymanager/3.5/reference/en/html_single/#d0e980">)
* "An entity manager factory is typically create at application initialization time and closed at
* * application end. It's creation is an expensive process."</a>
* </p>
* * application end. It's creation is an expensive process."</a></p>
* <p>
* Hence the EMF is implemented as a field in this class.
*
* <b>NOTE:</b> While the EMF is <b>thread safe</b>, the EM is <b>not thread safe</b>.
* </p>
* <p><b>NOTE:</b> While the EMF is <b>thread safe</b>, the EM is <b>not thread safe</b>.</p>
*/
public class AddressBookDBHandler implements AddressBook {
......
......@@ -7,11 +7,11 @@ import java.util.TreeMap;
/**
* Represents an Address book containing contacts with contact details.
* Based on the example in the book "Objects first with Java" by David J. Barnes
* and Michael Kölling.
* and Michael K&ouml;lling.
*
* <p>Each contact is stored in a TreeMap using the phone number as the key.
*
* @author David J. Barnes and Michael Kölling and Arne Styve
* @author David J. Barnes and Michael K&ouml;lling and Arne Styve
* @version 2020.03.16
*/
public class AddressBookPlain implements AddressBook {
......@@ -64,7 +64,7 @@ public class AddressBookPlain implements AddressBook {
@Override
public void close() {
// Left empty intentionally. Nothing to close in this class.
}
@Override
......
......@@ -8,9 +8,9 @@ import javax.persistence.Id;
/**
* Holds details about a contact, like name, address and phone number.
* Based on the example in the book "Objects first with Java" by David J. Barnes
* and Michael Kölling.
* and Michael K&ouml;lling.
*
* @author David J. Barnes and Michael Kölling and Arne Styve
* @author David J. Barnes and Michael K&ouml;lling and Arne Styve
* @version 2020.03.16
*/
@Entity
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment