Class SessionFactoryProvider
java.lang.Object
me.nickhanson.codeforge.persistence.SessionFactoryProvider
Provides a singleton SessionFactory for Hibernate ORM.
Resolution order for config values:
1) System properties (e.g. -Dhibernate.connection.url=...)
2) Environment variables (e.g. DB_HOST, DB_USER, DB_PASS, ...)
3) local.properties (on classpath, git-ignored; for local dev)
4) Hard-coded default (only for non-secret things)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.hibernate.SessionFactoryGets the singleton SessionFactory instance.
-
Constructor Details
-
SessionFactoryProvider
public SessionFactoryProvider()
-
-
Method Details
-
getSessionFactory
public static org.hibernate.SessionFactory getSessionFactory()Gets the singleton SessionFactory instance.
-