aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/dcae/inventory/daos
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/onap/dcae/inventory/daos')
-rw-r--r--src/main/java/org/onap/dcae/inventory/daos/DCAEServiceTypesDAO.java2
-rw-r--r--src/main/java/org/onap/dcae/inventory/daos/DCAEServicesComponentsMapsDAO.java2
-rw-r--r--src/main/java/org/onap/dcae/inventory/daos/DCAEServicesDAO.java3
3 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/org/onap/dcae/inventory/daos/DCAEServiceTypesDAO.java b/src/main/java/org/onap/dcae/inventory/daos/DCAEServiceTypesDAO.java
index bdb6298..aa242a4 100644
--- a/src/main/java/org/onap/dcae/inventory/daos/DCAEServiceTypesDAO.java
+++ b/src/main/java/org/onap/dcae/inventory/daos/DCAEServiceTypesDAO.java
@@ -40,6 +40,7 @@ import org.skife.jdbi.v2.sqlobject.customizers.Mapper;
public interface DCAEServiceTypesDAO extends InventoryDAO {
@SqlQuery("select exists (select * from information_schema.tables where table_name = \'dcae_service_types\')")
+ @Override
Boolean checkIfTableExists();
/**
@@ -51,6 +52,7 @@ public interface DCAEServiceTypesDAO extends InventoryDAO {
"vnf_types varchar[] not null, service_ids varchar[], service_locations varchar[], " +
"asdc_service_id varchar, asdc_resource_id varchar, " +
"created timestamp not null, deactivated timestamp, constraint pk_type_created primary key (type_id))")
+ @Override
void createTable();
// REVIEW: asdcServiceId and asdcResourceId is implicitly part of the unique key and thus shouldn't be updated.
diff --git a/src/main/java/org/onap/dcae/inventory/daos/DCAEServicesComponentsMapsDAO.java b/src/main/java/org/onap/dcae/inventory/daos/DCAEServicesComponentsMapsDAO.java
index 68ed59c..270d638 100644
--- a/src/main/java/org/onap/dcae/inventory/daos/DCAEServicesComponentsMapsDAO.java
+++ b/src/main/java/org/onap/dcae/inventory/daos/DCAEServicesComponentsMapsDAO.java
@@ -34,8 +34,10 @@ import org.skife.jdbi.v2.sqlobject.SqlUpdate;
public interface DCAEServicesComponentsMapsDAO extends InventoryDAO {
@SqlQuery("select exists (select * from information_schema.tables where table_name = \'dcae_services_components_maps\')")
+ @Override
Boolean checkIfTableExists();
+ @Override
@SqlUpdate("create table dcae_services_components_maps (service_id varchar not null references dcae_services (service_id), " +
"component_id varchar not null references dcae_service_components (component_id), " +
"created timestamp not null, primary key (service_id, component_id))")
diff --git a/src/main/java/org/onap/dcae/inventory/daos/DCAEServicesDAO.java b/src/main/java/org/onap/dcae/inventory/daos/DCAEServicesDAO.java
index c1ca46e..0595a9a 100644
--- a/src/main/java/org/onap/dcae/inventory/daos/DCAEServicesDAO.java
+++ b/src/main/java/org/onap/dcae/inventory/daos/DCAEServicesDAO.java
@@ -42,7 +42,8 @@ public interface DCAEServicesDAO extends InventoryDAO {
@SqlUpdate("create table dcae_services (service_id varchar not null primary key, type_id varchar not null, " +
"vnf_id varchar not null, vnf_type varchar not null, vnf_location varchar not null, deployment_ref varchar, " +
- "created timestamp not null, modified timestamp not null, status varchar not null)")
+ "created timestamp not null, modified timestamp not null, status varchar not null)")
+ @Override
void createTable();
@SqlUpdate("insert into dcae_services(service_id, type_id, vnf_id, vnf_type, vnf_location, deployment_ref, " +