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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddEntityClass(Class<?>... clazz) Add entity class to the clientorg.hibernate.SessionFactoryBuild the session factory from the clientConfigure the configurationorg.hibernate.cfg.ConfigurationGet the originalGet the setting
-
Constructor Details
-
HibernateClient
Create new Hibernate client- Parameters:
setting- the setting
-
-
Method Details
-
getSetting
Description copied from interface:ClientGet the setting- Specified by:
getSettingin interfaceClient<org.hibernate.cfg.Configuration>- Returns:
- the setting
-
getOriginal
public org.hibernate.cfg.Configuration getOriginal()Description copied from interface:ClientGet the original- Specified by:
getOriginalin 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:
-
buildSessionFactory
public org.hibernate.SessionFactory buildSessionFactory()Build the session factory from the client- Returns:
- the session factory
-