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.
Add methods in the DAO class
From the course: Java EE: Concurrency and Multithreading
Add methods in the DAO class
- [Instructor] Now let us add a method in the BankAccountDao to get the bank account information for all users. We'll retrieve that information from the bank account table, and once that's done, all the rows that we get out of it, we're going to make a collection of bank account bean objects. Similarly, we'll add another method in the Dao class which will fetch us the transaction information for every bank account. If there are multiple transactions, all of those rows will be contained in a list of bank account transaction beans. Let's head to the IDE. That's the Dao class. We have created a data source. This is the source from which we are going to retrieve the connection object to make the transactions. We've already tied up this data source by a constructor to our Dao class, so let's add the methods. The first one will be public. It will return us a list of bank account beans, which is this; getAllBankAccounts. What are we going to do here is, we are first going to get the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
Need for Java EE concurrency4m 14s
-
(Locked)
Java EE concurrency APIs3m 52s
-
(Locked)
Set up a Java EE RESTful application8m 4s
-
(Locked)
Running and testing the Java EE RESTful application4m 47s
-
(Locked)
Important Java EE terms4m 4s
-
(Locked)
ManagedExecutorService (MES) overview3m 20s
-
(Locked)
Define the bank account related beans and DAO class3m 28s
-
(Locked)
Add methods in the DAO class10m 30s
-
(Locked)
Define ReportProcessor7m 42s
-
(Locked)
Write REST class for injecting MES objects6m 51s
-
(Locked)
Verify code and add the REST method8m 42s
-
(Locked)
Run and test the ManagedExecutorService application2m 59s
-
(Locked)
ManagedScheduledExecutorService overview2m 22s
-
(Locked)
Defining the URLProcessor for the thread's job6m 47s
-
(Locked)
Add a REST method to call the URLProcessor5m 20s
-
(Locked)
Important pointers and API overview6m 22s
-
(Locked)
ManagedThreadFactory API1m 26s
-
(Locked)
Create a single thread with ManagedThreadFactory6m 7s
-
(Locked)
ManagedThreadFactory with ThreadPoolExecutor7m 2s
-
(Locked)
ContextService API3m 7s
-
(Locked)
Create a contextual proxy9m 15s
-
-
-