1. Project Clover database Wed Jan 17 2024 23:40:18 CST
  2. Package org.europa.together.domain

File JdbcConnection.java

 

Coverage histogram

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

Code metrics

0
12
3
1
65
44
3
0.25
4
3
1

Classes

Class Line # Actions
JdbcConnection 9 12 0% 3 0
1.0100%
 

Contributing tests

This file is covered by 10 tests. .

Source view

1    package org.europa.together.domain;
2   
3    import java.util.Map;
4   
5    /**
6    * Contains all information about a JDBC connection. Immutable and read only
7    * access.
8    */
 
9    public final class JdbcConnection {
10   
11    //CHECKSTYLE:OFF
12    public final String JDBC_VERSION;
13    public final String DBMS_NAME;
14    public final String DBMS_VERSION;
15    public final String DRIVER_NAME;
16    public final String DRIVER_VERSION;
17    public final String USER;
18    public final String URL;
19    public final String IP;
20    public final String PORT;
21    public final String CATALOG;
22    //CHECKSTYLE:ON
23   
24    /**
25    * Constructor.
26    */
 
27  1 toggle private JdbcConnection() {
28  1 throw new UnsupportedOperationException();
29    }
30   
31    /**
32    * Constructor.
33    *
34    * @param properties as List
35    */
 
36  20 toggle public JdbcConnection(final Map<String, String> properties) {
37   
38  20 JDBC_VERSION = properties.get("metaJdbcVersion");
39  20 DBMS_NAME = properties.get("metaDbmsName");
40  20 DBMS_VERSION = properties.get("metaDbmsVersion");
41  20 DRIVER_NAME = properties.get("metaJdbcDriverName");
42  20 DRIVER_VERSION = properties.get("metaJdbcDriverVersion");
43  20 USER = properties.get("metaUser");
44  20 URL = properties.get("metaUrl");
45  20 IP = properties.get("metaIP");
46  20 PORT = properties.get("metaPort");
47  20 CATALOG = properties.get("metaCatalog");
48    }
49   
 
50  20 toggle @Override
51    public String toString() {
52  20 return "JdbcConnection{"
53    + " JDBC_VERSION=" + JDBC_VERSION
54    + " DBMS_NAME=" + DBMS_NAME
55    + " DBMS_VERSION=" + DBMS_VERSION
56    + " DRIVER_NAME=" + DRIVER_NAME
57    + " DRIVER_VERSION=" + DRIVER_VERSION
58    + " USER=" + USER
59    + " URL=" + URL
60    + " IP=" + IP
61    + " PORT=" + PORT
62    + " CATALOG=" + CATALOG
63    + " }";
64    }
65    }