本文整理汇总了Java中org.hibernate.cfg.Configuration.getProperties方法的典型用法代码示例。如果您正苦于以下问题:Java Configuration.getProperties方法的具体用法?Java Configuration.getProperties怎么用?Java Configuration.getProperties使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.hibernate.cfg.Configuration
的用法示例。
在下文中一共展示了Configuration.getProperties方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initialize
import org.hibernate.cfg.Configuration; //导入方法依赖的package包/类
public void initialize(Configuration cfg) {
if ( !initialized ) {
ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
Properties props = cfg.getProperties();
init( factory, props );
}
}
示例2: configureSessionFactory
import org.hibernate.cfg.Configuration; //导入方法依赖的package包/类
private static SessionFactory configureSessionFactory()
throws HibernateException {
Configuration configuration = new Configuration();
configuration.configure();
Properties properties = configuration.getProperties();
ServiceRegistry serviceRegistry = new ServiceRegistryBuilder().
applySettings(properties).buildServiceRegistry();
SessionFactory sessionFactory = configuration.
buildSessionFactory(serviceRegistry);
return sessionFactory;
}
示例3: SchemaUpdate
import org.hibernate.cfg.Configuration; //导入方法依赖的package包/类
public SchemaUpdate(Configuration cfg) throws HibernateException {
this( cfg, cfg.getProperties() );
}
示例4: SchemaValidator
import org.hibernate.cfg.Configuration; //导入方法依赖的package包/类
public SchemaValidator(Configuration cfg) throws HibernateException {
this( cfg, cfg.getProperties() );
}
示例5: SchemaExport
import org.hibernate.cfg.Configuration; //导入方法依赖的package包/类
/**
* Create a schema exporter for the given Configuration
*
* @param configuration The configuration from which to build a schema export.
* @throws HibernateException Indicates problem preparing for schema export.
*/
public SchemaExport(Configuration configuration) {
this( configuration, configuration.getProperties() );
}