Example usage for org.hibernate.cfg AvailableSettings CACHE_PROVIDER_CONFIG

List of usage examples for org.hibernate.cfg AvailableSettings CACHE_PROVIDER_CONFIG

Introduction

In this page you can find the example usage for org.hibernate.cfg AvailableSettings CACHE_PROVIDER_CONFIG.

Prototype

String CACHE_PROVIDER_CONFIG

To view the source code for org.hibernate.cfg AvailableSettings CACHE_PROVIDER_CONFIG.

Click Source Link

Document

The CacheProvider implementation class

Usage

From source file:debop4k.data.orm.spring.boot.autoconfigure.HibernateProperties.java

License:Apache License

@SneakyThrows({ IOException.class })
public Properties toProperties() {
    Properties props = new Properties();

    props.put(AvailableSettings.DIALECT, dialect);

    props.put(AvailableSettings.HBM2DDL_AUTO, hbm2ddl);
    props.put(AvailableSettings.SHOW_SQL, showSql);
    props.put(AvailableSettings.FORMAT_SQL, formatSql);

    props.put(AvailableSettings.DEFAULT_BATCH_FETCH_SIZE, batchFetchSize);

    if (Stringx.isNotEmpty(isolation)) {
        props.put(AvailableSettings.ISOLATION, isolation);
    }//from   www .ja  v  a 2s. co m
    props.put(AvailableSettings.AUTOCOMMIT, autoCommit);
    props.put(AvailableSettings.RELEASE_CONNECTIONS, releaseMode);

    props.put(AvailableSettings.USE_SECOND_LEVEL_CACHE, useSecondCache);
    props.put(AvailableSettings.CACHE_PROVIDER_CONFIG, cacheProviderConfig.getFile().getAbsolutePath());

    return props;
}