diff --git a/src/main/java/edu/group5/app/model/DBRepository.java b/src/main/java/edu/group5/app/model/DBRepository.java index 0a37add..7502809 100644 --- a/src/main/java/edu/group5/app/model/DBRepository.java +++ b/src/main/java/edu/group5/app/model/DBRepository.java @@ -1,4 +1,40 @@ package edu.group5.app.model; -public class DBRepository { + +import java.util.HashMap; + +/** + * Abstract base class for repositories that store their data + * in a database-related structure. + * + *

+ * Extends {@link Repository} and specifies that the content + * is stored as a {@link HashMap}. + *

+ */ +public abstract class DBRepository extends Repository { + /** + * The underlying data structure containing the repository entities. + */ + protected HashMap content; + + /** + * Constructs a DBRepository with the given content. + * + * @param content the HashMap used to store repository entities + */ + protected DBRepository(HashMap content) { + super(content); + this.content = content; + } + + /** + * Returns the underlying HashMap containing the repository entities. + * + * @return the repository content as a HashMap + */ + @Override + public HashMap getContent() { + return content; + } }