xxxxxxxxxx
In Java servers, persistence layer is also known as the repository layer.
This layer is responsible for data persistence and is used by the business layer to access the cache and database.
In terms of functionality, it is fine to write the persistence layer code in the service class.