1. Project Clover database Mon Dec 22 2025 14:59:38 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
95
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    /**
13    * Version of the JDBC Driver.
14    */
15    public final String JDBC_VERSION;
16    /**
17    * DBMS Type.
18    */
19    public final String DBMS_NAME;
20    /**
21    * DBMS version.
22    */
23    public final String DBMS_VERSION;
24    /**
25    * Class name of the database driver.
26    */
27    public final String DRIVER_NAME;
28    /**
29    * Version number of the databae driver.
30    */
31    public final String DRIVER_VERSION;
32    /**
33    * DBMS user for the connection.
34    */
35    public final String USER;
36    /**
37    * DBMS connection string.
38    */
39    public final String URL;
40    /**
41    * DBMS connection IP
42    */
43    public final String IP;
44    /**
45    * DBMS connection port.
46    */
47    public final String PORT;
48    /**
49    * database schema name.
50    */
51    public final String CATALOG;
52    //CHECKSTYLE:ON
53   
54    /**
55    * Constructor.
56    */
 
57  1 toggle private JdbcConnection() {
58  1 throw new UnsupportedOperationException();
59    }
60   
61    /**
62    * Constructor.
63    *
64    * @param properties as List
65    */
 
66  79 toggle public JdbcConnection(final Map<String, String> properties) {
67   
68  79 JDBC_VERSION = properties.get("metaJdbcVersion");
69  79 DBMS_NAME = properties.get("metaDbmsName");
70  79 DBMS_VERSION = properties.get("metaDbmsVersion");
71  79 DRIVER_NAME = properties.get("metaJdbcDriverName");
72  79 DRIVER_VERSION = properties.get("metaJdbcDriverVersion");
73  79 USER = properties.get("metaUser");
74  79 URL = properties.get("metaUrl");
75  79 IP = properties.get("metaIP");
76  79 PORT = properties.get("metaPort");
77  79 CATALOG = properties.get("metaCatalog");
78    }
79   
 
80  79 toggle @Override
81    public String toString() {
82  79 return "JdbcConnection{"
83    + " JDBC_VERSION=" + JDBC_VERSION
84    + " DBMS_NAME=" + DBMS_NAME
85    + " DBMS_VERSION=" + DBMS_VERSION
86    + " DRIVER_NAME=" + DRIVER_NAME
87    + " DRIVER_VERSION=" + DRIVER_VERSION
88    + " USER=" + USER
89    + " URL=" + URL
90    + " IP=" + IP
91    + " PORT=" + PORT
92    + " CATALOG=" + CATALOG
93    + " }";
94    }
95    }