Skip to content

GitHub repository for a OOP project that registers and manage students using Hibernate to persist data, the DAO pattern for data access, Facade for simplifying interfaces, MVC for separating presentation and logic, and a MySQL database for storage

Notifications You must be signed in to change notification settings

giovaneneves7/OOP-Project-with-JPA-and-Hibernate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

+

OOP Project: JPA and Hibernate


⚙ Contents:

Model | View | Controller | DAO | Service | Exceptions | Util

About:

This is a project that simulates a student management system, which saves student data in a database with Hibernate ORM. Check out the wiki for details:


🛠 Features:

1.0 Add: opens a new screen to register a student in the database. The new screen will be overlaid on the current screen, this means that the "refresh" button will have to be pressed every time a new student is registered.
image


2.0 Edit: Opens a new screen to edit a student. To remove the selection from the row, refresh it by clicking the "refresh" button. If you want to select another student, click on the new student, only one student can be selected at a time.
image


2.1 Edit: If a row in the table is not selected, a screen will open asking for the ID of the student you want to edit.
image


3.0 Delete: Deletes the selected line.
image


3.1 Delete: If a row in the table is not selected, a screen will open asking for the ID of the student you want to delete.
image


4.0 Refresh: Refresh the page. Some data may not load correctly into the table after an operation on other screens. Pressing the button will retrieve the updated data from the database.
image

5.0 Search Bar: The search bar collects the text you type and searches the database for students with names containing the characters you type. When the search bar is empty, it loads all data from the database. If you type in a student name that does not exist in the database, the table is empty.
image

6.0 Statistic Panels: The panels use the list data to display numbers for the total number of students, the average grade for each student, and the total number of students who pass (students who pass have a grade higher than 7). When a student is added or removed, the panels update in real-time.
image

📟 GUI:

New Version:

Version 1.2: Simple interfaces, with buttons for managing the data of students registered in the database.

1.0: Home Screen. Screen with a list of all the students registered in the database. Students are listed alphabetically, not in order of IDs. Check the utility of each button above, in the Utilities topic.

2.0: Registration Screen. The screen has layers of validations to check the integrity of the data. Data will only be registered if all text fields pass the validations of the Class DataFormatValidator.

3.0: Update Screen. As with the registration class, the text fields of the update class are validated by the DataFormatValidator.


🧉 Sources:

Link to the icons used in the buttons: MyWorkspace.html

MySQL remote database: Free SQL DataBase

📼 SQL Sources:

Because of a "create" error in <property name="hibernate.hbm2ddl.auto" value="create" />, on the Free SQL Database site, the table "students" had to be created manually with the following SQL:

USE school;

CREATE TABLE students (
  id INT NOT NULL AUTO_INCREMENT,
  name VARCHAR(255) NOT NULL,
  registration_number VARCHAR(20) NOT NULL DEFAULT '',
  birth_date DATE NOT NULL DEFAULT '1111-11-11',
  academic_year INT NOT NULL DEFAULT 0,
  grade1 FLOAT NOT NULL DEFAULT 0,
  grade2 FLOAT NOT NULL DEFAULT 0,
  grade3 FLOAT NOT NULL DEFAULT 0,
  average_grade FLOAT NOT NULL DEFAULT 0,
  PRIMARY KEY (id)
);

About

GitHub repository for a OOP project that registers and manage students using Hibernate to persist data, the DAO pattern for data access, Facade for simplifying interfaces, MVC for separating presentation and logic, and a MySQL database for storage

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages