From the course: Java EE: Concurrency and Multithreading

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Define UserDao and user beans

Define UserDao and user beans

- [Narrator] Here we have the list of the steps that we want to execute as a part of the demo. We'll follow each of the steps one by one and simultaneously of course we've called for it. So the first step is you have to define a user bean to store all user information. So let's go on to the beans folder. And create a Java class, let's call it user. And let's give it attributes. We've already seen the files. So we know that there's an ID, email and a name. So int id string name string email address and we'll immediately insert the code for get her sitters, because we have to stick to the encapsulation concept of object oriented programming. So that's the first step. Next is you have to define a class user dao for all the database operations and define a method in it to insert user records in database. So we said that we'll have a different class for database interactions. So let's go to the dao package and create a class called user dao. And this is going to have a method public, let's…

Contents