Making use of the JPA and Spring Data JPA
In this section, we are going to wire the business logic we need for our application.
Because we have set up the configuration for the JPA and Spring Data JPA, and because we have defined our entities and their relationships, we can now use this model for time and energy-saving.
How to do it...
The following steps will guide you through the changes:
- In the
edu.zipcloud.cloudstreetmarket.core.daospackage, we can find the following two interfaces:public interface HistoricalIndexRepository { Iterable<HistoricalIndex> findIntraDay(String code, Date of); Iterable<HistoricalIndex> findLastIntraDay(String code); HistoricalIndex findLastHistoric(String code); } public interface TransactionRepository { Iterable<Transaction> findAll(); Iterable<Transaction> findByUser(User user); Iterable<Transaction> findRecentTransactions(Date from); Iterable<Transaction> findRecentTransactions(int nb); } - These two interfaces...