Class PersistenceClient
java.lang.Object
me.hsgamer.hscore.database.client.jpa.PersistenceClient
- All Implemented Interfaces:
Client<jakarta.persistence.EntityManagerFactory>
public class PersistenceClient
extends Object
implements Client<jakarta.persistence.EntityManagerFactory>
The JPA persistence client
-
Constructor Summary
ConstructorDescriptionPersistenceClient
(String name, Setting setting) Create a new persistence client -
Method Summary
Modifier and TypeMethodDescriptionjakarta.persistence.EntityManager
Get a new entity managerjakarta.persistence.EntityManagerFactory
Get the originalGet the setting
-
Constructor Details
-
PersistenceClient
Create a new persistence client- Parameters:
name
- The name of the persistence clientsetting
- The setting of the persistence client
-
-
Method Details
-
getSetting
Description copied from interface:Client
Get the setting- Specified by:
getSetting
in interfaceClient<jakarta.persistence.EntityManagerFactory>
- Returns:
- the setting
-
getOriginal
public jakarta.persistence.EntityManagerFactory getOriginal()Description copied from interface:Client
Get the original- Specified by:
getOriginal
in interfaceClient<jakarta.persistence.EntityManagerFactory>
- Returns:
- the original
-
getEntityManager
public jakarta.persistence.EntityManager getEntityManager()Get a new entity manager- Returns:
- The entity manager
-