BrightSide Workbench Full Report + Source Code
org.turro.jpa.config.JpaConfigMigrate Class Reference

Static Public Member Functions

static void migrate (Document document, String name)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 32 of file JpaConfigMigrate.java.

Member Function Documentation

◆ migrate()

static void org.turro.jpa.config.JpaConfigMigrate.migrate ( Document  document,
String  name 
)
static

Definition at line 34 of file JpaConfigMigrate.java.

34  {
35  Properties properties = new Properties();
36  HibernateConfig hc = (HibernateConfig) HeadlessApplication.getInstance()
37  .getImplementation("IHibernateConfig_" + name);
38  if(hc != null) {
39  hc.updateProperties(properties);
40  try {
41  JpaConfig config = new JpaConfig();
42  config.setUrl(properties.getProperty("hibernate.connection.url"));
43  config.setUsername(properties.getProperty("hibernate.connection.username"));
44  config.setPassword(properties.getProperty("hibernate.connection.password"));
45  document.content(config.toJson());
46  } catch (IOException ex) {
47  WebLoggers.severe(JpaConfigMigrate.class).exception(ex).log();
48  }
49  }
50  }
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: