summaryrefslogtreecommitdiffstats
path: root/models-dao
diff options
context:
space:
mode:
Diffstat (limited to 'models-dao')
-rw-r--r--models-dao/pom.xml7
-rw-r--r--models-dao/src/main/java/org/onap/policy/models/dao/DaoParameters.java77
-rw-r--r--models-dao/src/test/java/org/onap/policy/models/dao/DaoMiscTest.java6
3 files changed, 11 insertions, 79 deletions
diff --git a/models-dao/pom.xml b/models-dao/pom.xml
index 4b62aa80a..7df645649 100644
--- a/models-dao/pom.xml
+++ b/models-dao/pom.xml
@@ -1,7 +1,7 @@
<!--
============LICENSE_START=======================================================
Copyright (C) 2019 Nordix Foundation.
- Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -43,10 +43,5 @@
<artifactId>h2</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>javax.xml.bind</groupId>
- <artifactId>jaxb-api</artifactId>
- <version>2.3.1</version>
- </dependency>
</dependencies>
</project>
diff --git a/models-dao/src/main/java/org/onap/policy/models/dao/DaoParameters.java b/models-dao/src/main/java/org/onap/policy/models/dao/DaoParameters.java
index a6b6f2f2e..98e31c423 100644
--- a/models-dao/src/main/java/org/onap/policy/models/dao/DaoParameters.java
+++ b/models-dao/src/main/java/org/onap/policy/models/dao/DaoParameters.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,12 +22,18 @@
package org.onap.policy.models.dao;
import java.util.Properties;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
/**
* This class is a POJO that holds properties for PF DAOs.
*
* @author Liam Fallon (liam.fallon@est.tech)
*/
+@Getter
+@Setter
+@ToString
public class DaoParameters {
/** The default PF DAO plugin class. */
public static final String DEFAULT_PLUGIN_CLASS = "org.onap.policy.models.dao.impl.DefaultPfDao";
@@ -37,65 +44,6 @@ public class DaoParameters {
private Properties jdbcProperties = new Properties();
/**
- * Gets the DAO plugin class, this is the DAO class to use and it must implement the
- * {@link PfDao} interface.
- *
- * @return the DAO plugin class
- */
- public String getPluginClass() {
- return pluginClass;
- }
-
- /**
- * Sets the DAO plugin class, a class that implements the {@link PfDao} interface.
- *
- * @param daoPluginClass the DAO plugin class
- */
- public void setPluginClass(final String daoPluginClass) {
- pluginClass = daoPluginClass;
- }
-
- /**
- * Gets the persistence unit for the DAO. The persistence unit defines the JDBC properties the
- * DAO will use. The persistence unit must defined in the {@code META-INF/persistence.xml}
- * resource file
- *
- * @return the persistence unit to use for JDBC access
- */
- public String getPersistenceUnit() {
- return persistenceUnit;
- }
-
- /**
- * Sets the persistence unit for the DAO. The persistence unit defines the JDBC properties the
- * DAO will use. The persistence unit must defined in the {@code META-INF/persistence.xml}
- * resource file
- *
- * @param daoPersistenceUnit the persistence unit to use for JDBC access
- */
- public void setPersistenceUnit(final String daoPersistenceUnit) {
- persistenceUnit = daoPersistenceUnit;
- }
-
- /**
- * Gets the JDBC properties.
- *
- * @return the JDBC properties
- */
- public Properties getJdbcProperties() {
- return jdbcProperties;
- }
-
- /**
- * Sets the JDBC properties.
- *
- * @param jdbcProperties the JDBC properties
- */
- public void setJdbcProperties(final Properties jdbcProperties) {
- this.jdbcProperties = jdbcProperties;
- }
-
- /**
* Gets a single JDBC property.
*
* @param key the key of the property
@@ -114,15 +62,4 @@ public class DaoParameters {
public void setJdbcProperty(final String key, final String value) {
jdbcProperties.setProperty(key, value);
}
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString() {
- return "DAOParameters [pluginClass=" + pluginClass + ", persistenceUnit=" + persistenceUnit
- + ", jdbcProperties=" + jdbcProperties + "]";
- }
}
diff --git a/models-dao/src/test/java/org/onap/policy/models/dao/DaoMiscTest.java b/models-dao/src/test/java/org/onap/policy/models/dao/DaoMiscTest.java
index 419714924..3a46570a4 100644
--- a/models-dao/src/test/java/org/onap/policy/models/dao/DaoMiscTest.java
+++ b/models-dao/src/test/java/org/onap/policy/models/dao/DaoMiscTest.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Nordix Foundation.
- * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -73,7 +73,7 @@ public class DaoMiscTest {
pars.setPluginClass(SOMEWHERE_OVER_THE_RAINBOW);
assertEquals(SOMEWHERE_OVER_THE_RAINBOW, pars.getPluginClass());
- assertEquals("DAOParameters [pluginClass=somewhere.over.the.rainbow, "
- + "persistenceUnit=Kansas, jdbcProperties={name=Dorothy}]", pars.toString());
+ assertEquals("DaoParameters(pluginClass=somewhere.over.the.rainbow, "
+ + "persistenceUnit=Kansas, jdbcProperties={name=Dorothy})", pars.toString());
}
}