Skip to content

layzimayner/hibernate-configuration-hw

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hibernate

We are starting to work with Hibernate on the new project. We will implement it step by step. The completed structure of the project is described below: pic

Your task is to implement the following steps:

  • add required hibernate dependencies
  • create a hibernate.cfg.xml file
  • create HibernateUtil class
  • create Movie model class
  • create MovieDao interface and MovieDaoImpl class
      public interface MovieDao {
          Movie add(Movie movie);
      
          Optional<Movie> get(Long id);
      }
  • create MovieService interface and MovieServiceImpl class
      public interface MovieService {
          Movie add(Movie movie);
      
          Movie get(Long id);
      }
  • create your custom unchecked DataProcessingException and throw it in the catch block on the DAO layer
  • in the mate/academy/Main.main() method create an instance of MovieService using injector and test all methods from MovieService
  • use annotations and the annotation injector located in the lib folder
  • run tests with the command mvn -DskipTests=false clean package.

!!! Important: you should have only the Movie model with dao and service layer. Don't create other models and don't push them to PR.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%