public final class Hibernate5Setup extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
close(org.hibernate.SessionFactory sf,
org.hibernate.Session s)
Closing the Hibernate resources -
SessionFactory
and the Session. |
static boolean |
createTable(org.hibernate.boot.Metadata metadata)
Based on the provided Hibernate
Metadata it runs schema export
to generate database schema aka. |
static org.hibernate.boot.Metadata |
getHibernateStartupMetadata(Properties setupProperties,
org.hibernate.service.ServiceRegistry standardRegistry)
Setting up the Hibernate as standalone app.
|
static org.hibernate.boot.registry.StandardServiceRegistry |
getStandardRegistry(Properties setupProperties)
Generate hibernate registry while filling it with properties.
|
public static org.hibernate.boot.registry.StandardServiceRegistry getStandardRegistry(Properties setupProperties)
setupProperties - properties for connectionpublic static org.hibernate.boot.Metadata getHibernateStartupMetadata(Properties setupProperties, org.hibernate.service.ServiceRegistry standardRegistry)
Metadata filled from provided properties.setupProperties - properties, probably taken from HibernateProperties#setupPropertiesByParsedArguments()standardRegistry - hibernate registry to be used for being able to link table naming strategySession creationpublic static boolean createTable(org.hibernate.boot.Metadata metadata)
Metadata it runs schema export
to generate database schema aka. tables.metadata - hibernate metadata as base for db schema generationpublic static void close(org.hibernate.SessionFactory sf,
org.hibernate.Session s)
SessionFactory
and the Session.sf - session factory to be closeds - session to be closedCopyright © 2018. All rights reserved.