Class HibernateClient
java.lang.Object
me.hsgamer.hscore.database.client.hibernate.HibernateClient
- All Implemented Interfaces:
Client<org.hibernate.cfg.Configuration>
The Hibernate client
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddEntityClass
(Class<?>... clazz) Add entity class to the clientorg.hibernate.SessionFactory
Build the session factory from the clientConfigure the configurationorg.hibernate.cfg.Configuration
Get the originalGet the setting
-
Constructor Details
-
HibernateClient
Create new Hibernate client- Parameters:
setting
- the setting
-
-
Method Details
-
getSetting
Description copied from interface:Client
Get the setting- Specified by:
getSetting
in interfaceClient<org.hibernate.cfg.Configuration>
- Returns:
- the setting
-
getOriginal
public org.hibernate.cfg.Configuration getOriginal()Description copied from interface:Client
Get the original- Specified by:
getOriginal
in interfaceClient<org.hibernate.cfg.Configuration>
- Returns:
- the original
-
configure
Configure the configuration- Parameters:
configurationConsumer
- the consumer- Returns:
- the client for chaining
-
addEntityClass
Add entity class to the client- Parameters:
clazz
- the entity class- Returns:
- the client for chaining
- See Also:
-
Configuration.addAnnotatedClass(Class)
-
buildSessionFactory
public org.hibernate.SessionFactory buildSessionFactory()Build the session factory from the client- Returns:
- the session factory
-