BrightSide Workbench Full Report + Source Code
org.turro.jpa.config.JpaConfig Class Reference
Inheritance diagram for org.turro.jpa.config.JpaConfig:
Collaboration diagram for org.turro.jpa.config.JpaConfig:

Public Member Functions

void setUrl (String url)
 
void setUsername (String username)
 
void setPassword (String password)
 
String toJson ()
 
String toJson (Map< String, Object > properties)
 

Static Public Member Functions

static List< Document > daos ()
 
static Properties from (String pu, String name)
 

Detailed Description

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

Definition at line 36 of file JpaConfig.java.

Member Function Documentation

◆ daos()

static List<Document> org.turro.jpa.config.JpaConfig.daos ( )
static

Definition at line 80 of file JpaConfig.java.

80  {
81  try {
82  Folder daoFolder = Folder.from(Path.of(ElephantContext.getRealPath(DAO_FOLDER)));
83  return daoFolder.documents("*.json");
84  } catch (IOException ex) {
85  WebLoggers.severe(JpaConfig.class).exception(ex).log();
86  }
87  return null;
88  }
Here is the call graph for this function:

◆ from()

static Properties org.turro.jpa.config.JpaConfig.from ( String  pu,
String  name 
)
static

Definition at line 106 of file JpaConfig.java.

106  {
107  try {
108  Document configFile = Document.from(Path.of(ElephantContext.getRealPath(DAO_FOLDER))
109  .resolve(pu + ".json"));
110  if(!configFile.exists()) {
111  JpaConfigMigrate.migrate(configFile, name);
112  }
113  return IJSONizable.fromJson(configFile.content(), JpaConfig.class).properties();
114  } catch (IOException ex) {
115  WebLoggers.severe(JpaConfig.class).exception(ex).log();
116  }
117  return null;
118  }
Here is the call graph for this function:

◆ setPassword()

void org.turro.jpa.config.JpaConfig.setPassword ( String  password)

Definition at line 48 of file JpaConfig.java.

48  {
49  this.password = password;
50  }
Here is the caller graph for this function:

◆ setUrl()

void org.turro.jpa.config.JpaConfig.setUrl ( String  url)

Definition at line 40 of file JpaConfig.java.

40  {
41  this.url = url;
42  }
Here is the caller graph for this function:

◆ setUsername()

void org.turro.jpa.config.JpaConfig.setUsername ( String  username)

Definition at line 44 of file JpaConfig.java.

44  {
45  this.username = username;
46  }
Here is the caller graph for this function:

◆ toJson() [1/2]

String org.turro.jpa.config.JpaConfig.toJson ( )

Definition at line 93 of file JpaConfig.java.

93  {
94  return toJson(this);
95  }
Here is the caller graph for this function:

◆ toJson() [2/2]

String org.turro.jpa.config.JpaConfig.toJson ( Map< String, Object >  properties)

Definition at line 98 of file JpaConfig.java.

98  {
99  return toJson(this, properties);
100  }
Here is the call graph for this function:

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