Example usage for org.hibernate.cfg DefaultComponentSafeNamingStrategy INSTANCE

List of usage examples for org.hibernate.cfg DefaultComponentSafeNamingStrategy INSTANCE

Introduction

In this page you can find the example usage for org.hibernate.cfg DefaultComponentSafeNamingStrategy INSTANCE.

Prototype

NamingStrategy INSTANCE

To view the source code for org.hibernate.cfg DefaultComponentSafeNamingStrategy INSTANCE.

Click Source Link

Usage

From source file:org.photovault.persistence.HibernateUtil.java

License:Open Source License

static public void init(String user, String passwd, PVDatabase dbDesc) throws PhotovaultException {
    try {/*  ww  w  .  j  av  a2 s . c om*/
        cfg = dbDesc.getDbDescriptor().initHibernate(user, passwd);
        cfg.setNamingStrategy(DefaultComponentSafeNamingStrategy.INSTANCE);
        sessionFactory = cfg.buildSessionFactory();
    } catch (Throwable ex) {
        throw new ExceptionInInitializerError(ex);
    }
}