Clover icon

sunshower-base

  1. Project Clover database Fri Apr 6 2018 03:41:27 UTC
  2. Package io.sunshower.persist.hibernate

File Configurations.java

 

Coverage histogram

../../../../img/srcFileCovDistChart10.png
0% of files have more coverage

Code metrics

0
8
6
1
48
28
6
0.75
1.33
6
1

Classes

Class Line # Actions
Configurations 6 8 6
1.0100%
 

Contributing tests

No tests hitting this source file were found.

Source view

1    package io.sunshower.persist.hibernate;
2   
3    import java.util.Properties;
4    import org.cfg4j.provider.ConfigurationProvider;
5   
 
6    public class Configurations {
7   
 
8  4 toggle public static Properties toNative(
9    ConfigurationProvider provider, HibernateProviderConfigurationSource source) {
10  4 final Properties properties = new Properties();
11  4 final HibernateDialectProperties dialect = resolve(provider, source);
12  4 configureSearch(dialect, properties);
13  4 configureDialect(dialect, properties);
14  4 configureDiagnostics(dialect, properties);
15   
16  4 return properties;
17    }
18   
 
19  4 toggle private static HibernateDialectProperties resolve(
20    ConfigurationProvider provider, HibernateProviderConfigurationSource source) {
21  4 return null;
22    }
23   
 
24  4 toggle private static void configureDialect(HibernateDialectProperties dialect, Properties properties) {
25    // properties.put("jpa.dialect", provider.getDialect());
26    }
27   
 
28  4 toggle private static void configureDiagnostics(
29    HibernateDialectProperties dialect, Properties properties) {
30    // DataDefinitionLanguage ddl = provider.getDdl();
31    // properties.setProperty("hibernate.show_sql", Boolean.toString(ddl.isShowSql()));
32    // properties.setProperty("hibernate.format_sql", Boolean.toString(ddl.isFormatSql()));
33    // if(ddl.isGenerate()) {
34    // properties.setProperty("hibernate.hbm2ddl.auto", ddl.getStrategy());
35    // }
36    }
37   
 
38  4 toggle private static void configureSearch(HibernateDialectProperties dialect, Properties properties) {
39    // SearchConfiguration search = provider.getSearch();
40    // if(search != null) {
41    // properties.setProperty(search.getType(), search.getValue());
42    // }
43    }
44   
 
45  4 toggle public static HibernateDialectProperties getProvider(ConfigurationProvider cfgProvider) {
46  4 return null;
47    }
48    }