Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge: Role Layers Implementation | Fundamentals of Hibernate
course content

Зміст курсу

Java Data Manipulation with Hibernate

Challenge: Role Layers ImplementationChallenge: Role Layers Implementation

Task

Now let's get to the task:

Your task is to implement the methods in the classes RoleDaoImpl, RoleServiceImpl, EmployeeDaoImpl, and EmployeeServiceImpl. This is not difficult; you have done this many times. The only potential challenge might be with the updateRole method, but I'm confident you can handle it.

To test your solution, you need to run the code I have written for you in the main class. Then, you will need to compare the result with the correct result, which I will provide below.

Testing such large applications with database interaction implementation becomes increasingly challenging, so now your project will be tested by yourself (or you can peek at the Solution).

Correct output:

Link to the Task: GitHub
1. First, you need to implement the methods from the RoleDao interface. You've done this many times before, so there shouldn't be any problems.
2. For the method with role update, use the following algorithm: Retrieve the role from the database, reassign the role's fields with new values, and use the session.merge() method.
3. To implement the setRoleById() method and override it, you can use the template from the previous chapter. You need to do the same thing.
4. Run the main class and compare your result with the expected one.

Все було зрозуміло?

Секція 2. Розділ 11
course content

Зміст курсу

Java Data Manipulation with Hibernate

Challenge: Role Layers ImplementationChallenge: Role Layers Implementation

Task

Now let's get to the task:

Your task is to implement the methods in the classes RoleDaoImpl, RoleServiceImpl, EmployeeDaoImpl, and EmployeeServiceImpl. This is not difficult; you have done this many times. The only potential challenge might be with the updateRole method, but I'm confident you can handle it.

To test your solution, you need to run the code I have written for you in the main class. Then, you will need to compare the result with the correct result, which I will provide below.

Testing such large applications with database interaction implementation becomes increasingly challenging, so now your project will be tested by yourself (or you can peek at the Solution).

Correct output:

Link to the Task: GitHub
1. First, you need to implement the methods from the RoleDao interface. You've done this many times before, so there shouldn't be any problems.
2. For the method with role update, use the following algorithm: Retrieve the role from the database, reassign the role's fields with new values, and use the session.merge() method.
3. To implement the setRoleById() method and override it, you can use the template from the previous chapter. You need to do the same thing.
4. Run the main class and compare your result with the expected one.

Все було зрозуміло?

Секція 2. Розділ 11
some-alt