|
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
|
|
private JdbcConnection() { |
|
58
|
|
throw new UnsupportedOperationException(); |
|
59
|
|
} |
|
60
|
|
|
|
61
|
|
/** |
|
62
|
|
* Constructor. |
|
63
|
|
* |
|
64
|
|
* @param properties as List |
|
65
|
|
*/ |
|
66
|
|
public JdbcConnection(final Map<String, String> properties) { |
|
67
|
|
|
|
68
|
|
JDBC_VERSION = properties.get("metaJdbcVersion"); |
|
69
|
|
DBMS_NAME = properties.get("metaDbmsName"); |
|
70
|
|
DBMS_VERSION = properties.get("metaDbmsVersion"); |
|
71
|
|
DRIVER_NAME = properties.get("metaJdbcDriverName"); |
|
72
|
|
DRIVER_VERSION = properties.get("metaJdbcDriverVersion"); |
|
73
|
|
USER = properties.get("metaUser"); |
|
74
|
|
URL = properties.get("metaUrl"); |
|
75
|
|
IP = properties.get("metaIP"); |
|
76
|
|
PORT = properties.get("metaPort"); |
|
77
|
|
CATALOG = properties.get("metaCatalog"); |
|
78
|
|
} |
|
79
|
|
|
|
80
|
|
@Override |
|
81
|
|
public String toString() { |
|
82
|
1
1. toString : replaced return value with "" for org/europa/together/domain/JdbcConnection::toString → SURVIVED
|
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
|
|
} |
| | Mutations |
| 82 |
|
1.1 Location : toString Killed by : none replaced return value with "" for org/europa/together/domain/JdbcConnection::toString → SURVIVED
Covering tests
Covered by tests:
- org.europa.together.domain.JdbcConnectionTest.[engine:junit-jupiter]/[class:org.europa.together.domain.JdbcConnectionTest]/[method:privateConstructor()]
- org.europa.together.domain.JdbcConnectionTest.[engine:junit-jupiter]/[class:org.europa.together.domain.JdbcConnectionTest]/[method:jdbcMetData()]
- org.europa.together.exceptions.TimeOutExceptionTest.[engine:junit-jupiter]/[class:org.europa.together.exceptions.TimeOutExceptionTest]/[method:exceptionObject()]
- org.europa.together.exceptions.DAOExceptionTest.[engine:junit-jupiter]/[class:org.europa.together.exceptions.DAOExceptionTest]/[method:exceptionObject()]
- org.europa.together.utils.ConstraintsTest.[engine:junit-jupiter]/[class:org.europa.together.utils.ConstraintsTest]/[method:privateConstructor()]
- org.europa.together.exceptions.JsonProcessingExceptionTest.[engine:junit-jupiter]/[class:org.europa.together.exceptions.JsonProcessingExceptionTest]/[method:exceptionObject()]
- org.europa.together.exceptions.MisconfigurationExceptionTest.[engine:junit-jupiter]/[class:org.europa.together.exceptions.MisconfigurationExceptionTest]/[method:exceptionObject()]
- org.europa.together.exceptions.UnsupportedVersionExceptionTest.[engine:junit-jupiter]/[class:org.europa.together.exceptions.UnsupportedVersionExceptionTest]/[method:exceptionObject()]
- org.europa.together.domain.MailTest.[engine:junit-jupiter]/[class:org.europa.together.domain.MailTest]/[method:subject()]
- org.europa.together.service.LoggingServiceTest.[engine:junit-jupiter]/[class:org.europa.together.service.LoggingServiceTest]/[method:constructor()]
- org.europa.together.application.VelocityRendererTest.[engine:junit-jupiter]/[class:org.europa.together.application.VelocityRendererTest]/[method:constructor()]
- org.europa.together.application.ZxingGeneratorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ZxingGeneratorTest]/[method:constructor()]
- org.europa.together.utils.ValidatorTest.[engine:junit-jupiter]/[class:org.europa.together.utils.ValidatorTest]/[method:isDateNotInRange_NullPointer()]
- org.europa.together.application.LogbackLoggerTest.[engine:junit-jupiter]/[class:org.europa.together.application.LogbackLoggerTest]/[method:constructor()]
- org.europa.together.domain.TreeNodeTest.[engine:junit-jupiter]/[class:org.europa.together.domain.TreeNodeTest]/[method:equalByDiffrentUuid()]
- org.europa.together.domain.VersionTest.[engine:junit-jupiter]/[class:org.europa.together.domain.VersionTest]/[method:failGetVersion_Minor()]
- org.europa.together.utils.FileUtilsTest.[engine:junit-jupiter]/[class:org.europa.together.utils.FileUtilsTest]/[method:appendFile()]
- org.europa.together.utils.StringUtilsTest.[engine:junit-jupiter]/[class:org.europa.together.utils.StringUtilsTest]/[method:shrinkContent()]
- org.europa.together.domain.JpaPaginationTest.[engine:junit-jupiter]/[class:org.europa.together.domain.JpaPaginationTest]/[method:domainObject()]
- org.europa.together.application.JacksonJsonToolsTest.[engine:junit-jupiter]/[class:org.europa.together.application.JacksonJsonToolsTest]/[method:failDeserializeJsonToObject()]
- org.europa.together.application.PropertyFileReaderTest.[engine:junit-jupiter]/[class:org.europa.together.application.PropertyFileReaderTest]/[method:addProperty()]
- org.europa.together.domain.ConfigurationDOTest.[engine:junit-jupiter]/[class:org.europa.together.domain.ConfigurationDOTest]/[method:validationEmptyValue()]
- org.europa.together.application.JdbcActionsTest.[engine:junit-jupiter]/[class:org.europa.together.application.JdbcActionsTest]/[method:fallbackLoadProperties()]
- org.europa.together.application.JdbcActionsTest.[engine:junit-jupiter]/[class:org.europa.together.application.JdbcActionsTest]/[method:getJdbcMetaData()]
- org.europa.together.application.JdbcActionsTest.[engine:junit-jupiter]/[class:org.europa.together.application.JdbcActionsTest]/[method:connect()]
- org.europa.together.application.JdbcActionsTest.[engine:junit-jupiter]/[class:org.europa.together.application.JdbcActionsTest]/[method:failExecuteQuery()]
- org.europa.together.application.JdbcActionsTest.[engine:junit-jupiter]/[class:org.europa.together.application.JdbcActionsTest]/[method:executeSqlFileFromClasspath()]
- org.europa.together.application.JdbcActionsTest.[engine:junit-jupiter]/[class:org.europa.together.application.JdbcActionsTest]/[method:sqlFileNotFound()]
- org.europa.together.application.ListTreeTest.[engine:junit-jupiter]/[class:org.europa.together.application.ListTreeTest]/[method:failValidateTreeNodeWithDisconnectedParent()]
- org.europa.together.application.JdbcActionsTest.[engine:junit-jupiter]/[class:org.europa.together.application.JdbcActionsTest]/[method:executeQuery()]
- org.europa.together.application.DaoPaginationTest.[engine:junit-jupiter]/[class:org.europa.together.application.DaoPaginationTest]/[method:fetchLessResultsThanAPage()]
- org.europa.together.application.JdbcActionsTest.[engine:junit-jupiter]/[class:org.europa.together.application.JdbcActionsTest]/[method:getResultSet()]
- org.europa.together.application.SaxToolsTest.[engine:junit-jupiter]/[class:org.europa.together.application.SaxToolsTest]/[method:invalidDtd()]
- org.europa.together.service.MailClientServiceTest.[engine:junit-jupiter]/[class:org.europa.together.service.MailClientServiceTest]/[method:constructor()]
- org.europa.together.application.NimbusJwtTest.[engine:junit-jupiter]/[class:org.europa.together.application.NimbusJwtTest]/[method:constructor()]
- org.europa.together.service.ConfigurationServiceTest.[engine:junit-jupiter]/[class:org.europa.together.service.ConfigurationServiceTest]/[method:constructor()]
- org.europa.together.application.JakartaMailClientTest.[engine:junit-jupiter]/[class:org.europa.together.application.JakartaMailClientTest]/[method:getMailObject()]
- org.europa.together.application.ImgSclrProcessorTest.[engine:junit-jupiter]/[class:org.europa.together.application.ImgSclrProcessorTest]/[method:resizeImageReduce()]
- org.europa.together.application.FeatureFlagsFF4jTest.[engine:junit-jupiter]/[class:org.europa.together.application.FeatureFlagsFF4jTest]/[method:updateFeatureNotExist()]
- org.europa.together.application.OpenPdfRendererTest.[engine:junit-jupiter]/[class:org.europa.together.application.OpenPdfRendererTest]/[method:includeLocalImages()]
- org.europa.together.application.ConfigurationHbmDAOTest.[engine:junit-jupiter]/[class:org.europa.together.application.ConfigurationHbmDAOTest]/[method:updateNotExist()]
- org.europa.together.application.JavaCryptoToolsTest.[engine:junit-jupiter]/[class:org.europa.together.application.JavaCryptoToolsTest]/[method:writeKeyPairToFile()]
|