3 Overview of the HR Web Application
The HR Web Application is intended to give you access to information related to all employees of AnyCo Corporation.
-
HRStaff
-
HRAdmin
The HRStaff and HRAdmin accounts have different privileges.
HRStaff has read only access to the application and does not have privileges to update/delete an employee record. HRStaff can only List the employees and Search by Employee ID.
The HRAdmin, has complete control on the application and has read and write privileges. HRAdmin is the only user who has access to all functionalities of the application such as update/delete an employee record, or provide salary increment for all employees.
This Chapter has the following sections:
3.1 Functionalities of the HR Web Application
Following is a list of functionalities to access information related to AnyCo Corporation:
-
List All Employees
Use the
List All Employees
option to retrieve employee information. This function lists information such asEmployee_ID
,First_Name
,Last_Name
,Email
,Phone_Number
,Job_Id
, andSalary
. -
Search By Employee ID
Use the
primary key
(which is the Employee ID) to search for a particular employee. -
Update Employee Record
You can update employee records, using the
Update Employee Record
function. First, search for employees, based on the name of the employee. You can then update employee details in the record, such asfirst_name
,last_name
,email
,phone_number
,job_id
andsalary
using theUPDATE
function.Use the
DELETE
function to the delete the entire employee record from the database. -
Increment Salary
Through the increment salary tab, you can alter (increase or decrease) the percentage of salary for hike.
-
About
This page provides an overview of the HR Application and explains the various functionalities it offers.
3.2 Components and Repositories
The following table lists and describes all the components required for the application.
See Also:
You can download the web application from the following github link:https://github.com/oracle/oracle-db-examples/tree/master/java/HRWebApp
Package Name | Desciption |
src |
Contains source files |
target |
Contains class files |
src/main/java/com/oracle/jdbc/samples |
- |
/bean/JdbcBean.java |
Defines the employee details as attributes |
/bean/JdbcBeanImpl.java |
Implementation class of the EmployeeBean |
src/main/java/com/oracle/jdbc/samples |
- |
entity/Employee.java |
Consists of all employee attributes and their defined datatypes |
/web/WebController.java |
Servlet that controls the application flow |
/web/GetRole.java |
Creates HRStaff and HRAdmin roles for the application |
|
- |
SalaryHikeSP.java |
Java class to be invoked from Java in the database to process an increment in salary |
SalaryHikeSP.sql |
SQL file with a procedure to increase the salary of the employees based on their salary range |
src/main/webapp |
- |
about.html |
Contains the details about the HR Web application |
login.html |
Contains the login page for the HR Web application |
login-failed.html |
Page to show when the login is unsuccessful |
index.html |
Landing page of the HR Web application |
listAll.html |
HTML page to display all employee records |
listByName.html |
HTML page to display the result when employees are searched by name |
listById.html |
HTML page to display the result when employees are searched by employee id |
incrementSalary.html |
HTML page to display the result after an increment is made to the salary |
src/main/webapp |
- |
css/app.cs |
Contains all style and font details used in the HR Web application |
src/main/webapp |
- |
WEB-INF/web.xml |
Controller for the HR Web application |