summaryrefslogtreecommitdiffstats
path: root/catalog-dao/src
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-dao/src')
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/ArtifactTableDescription.java27
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/AuthEventTableDescription.java27
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribBaseEventTableDesc.java28
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribDeployEventTableDesc.java28
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribDownloadEventTableDesc.java27
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribEngineEventTableDesc.java27
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribNotifEventTableDesc.java27
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/EcompOperationalEnvironmentEventTableDesc.java27
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/ExternalApiEventTableDesc.java27
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/FeatureToggleEventTableDesc.java28
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/GetCatHierEventTableDesc.java27
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/GetUebClusterEventTableDesc.java27
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/GetUsersListEventTableDesc.java27
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/MigrationTasksTableDescription.java27
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/OldExternalApiEventTableDesc.java27
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/OperationalEnvironmentsTableDescription.java27
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/SdcSchemaFilesTableDescription.java29
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/UserAccessEventTableDescription.java47
18 files changed, 136 insertions, 375 deletions
diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/ArtifactTableDescription.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/ArtifactTableDescription.java
index 5a7ebb4a14..128fd9db65 100644
--- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/ArtifactTableDescription.java
+++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/ArtifactTableDescription.java
@@ -21,6 +21,8 @@
package org.openecomp.sdc.be.dao.cassandra.schema.tables;
import com.datastax.driver.core.DataType;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.openecomp.sdc.be.dao.cassandra.schema.ITableDescription;
import org.openecomp.sdc.be.resources.data.auditing.AuditingTypesConstants;
@@ -60,30 +62,15 @@ public class ArtifactTableDescription implements ITableDescription {
return "resources";
}
+ @Getter
+ @AllArgsConstructor
enum ArtifactFieldsDescription {
DATA("data", DataType.blob(), false);
- private String name;
- private DataType type;
- private boolean indexed;
+ private final String name;
+ private final DataType type;
+ private final boolean indexed;
- ArtifactFieldsDescription(String name, DataType type, boolean indexed) {
- this.name = name;
- this.type = type;
- this.indexed = indexed;
- }
-
- public String getName() {
- return name;
- }
-
- public DataType getType() {
- return type;
- }
-
- public boolean isIndexed() {
- return indexed;
- }
}
@Override
diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/AuthEventTableDescription.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/AuthEventTableDescription.java
index c0218fd126..a2b6534897 100644
--- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/AuthEventTableDescription.java
+++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/AuthEventTableDescription.java
@@ -21,6 +21,8 @@
package org.openecomp.sdc.be.dao.cassandra.schema.tables;
import com.datastax.driver.core.DataType;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.openecomp.sdc.be.dao.cassandra.schema.ITableDescription;
import org.openecomp.sdc.be.resources.data.auditing.AuditingTypesConstants;
@@ -66,6 +68,8 @@ public class AuthEventTableDescription implements ITableDescription {
return AuditingTypesConstants.AUTH_EVENT_TYPE;
}
+ @Getter
+ @AllArgsConstructor
enum AEFieldsDescription {
URL("url", DataType.varchar(), false),
REQUEST_ID("request_id", DataType.varchar(), true),
@@ -76,27 +80,10 @@ public class AuthEventTableDescription implements ITableDescription {
STATUS("status", DataType.varchar(), false),
DESC("description", DataType.varchar(), false);
- private String name;
- private DataType type;
- private boolean indexed;
+ private final String name;
+ private final DataType type;
+ private final boolean indexed;
- AEFieldsDescription(String name, DataType type, boolean indexed) {
- this.name = name;
- this.type = type;
- this.indexed = indexed;
- }
-
- public String getName() {
- return name;
- }
-
- public DataType getType() {
- return type;
- }
-
- public boolean isIndexed() {
- return indexed;
- }
}
}
diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribBaseEventTableDesc.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribBaseEventTableDesc.java
index 81d882e7dd..68d23731f5 100644
--- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribBaseEventTableDesc.java
+++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribBaseEventTableDesc.java
@@ -21,6 +21,8 @@
package org.openecomp.sdc.be.dao.cassandra.schema.tables;
import com.datastax.driver.core.DataType;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.openecomp.sdc.be.dao.cassandra.schema.ITableDescription;
import org.openecomp.sdc.be.resources.data.auditing.AuditingTypesConstants;
@@ -63,7 +65,8 @@ public abstract class DistribBaseEventTableDesc implements ITableDescription {
protected abstract void updateColumnDistribDescription(final Map<String, ImmutablePair<DataType, Boolean>> columns);
-
+ @Getter
+ @AllArgsConstructor
enum DistFieldsDescription {
ACTION("action", DataType.varchar(), true),
STATUS("status", DataType.varchar(), false),
@@ -71,26 +74,9 @@ public abstract class DistribBaseEventTableDesc implements ITableDescription {
REQUEST_ID("request_id", DataType.varchar(), false),
SERVICE_INST_ID("service_instance_id", DataType.varchar(), false);
- private String name;
- private DataType type;
- private boolean indexed;
-
- DistFieldsDescription(String name, DataType type, boolean indexed) {
- this.name = name;
- this.type = type;
- this.indexed = indexed;
- }
-
- public String getName() {
- return name;
- }
-
- public DataType getType() {
- return type;
- }
+ private final String name;
+ private final DataType type;
+ private final boolean indexed;
- public boolean isIndexed() {
- return indexed;
- }
}
}
diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribDeployEventTableDesc.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribDeployEventTableDesc.java
index fefe55313c..32e5e490d3 100644
--- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribDeployEventTableDesc.java
+++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribDeployEventTableDesc.java
@@ -21,6 +21,8 @@
package org.openecomp.sdc.be.dao.cassandra.schema.tables;
import com.datastax.driver.core.DataType;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.openecomp.sdc.be.resources.data.auditing.AuditingTypesConstants;
@@ -28,7 +30,6 @@ import java.util.Map;
public class DistribDeployEventTableDesc extends DistribBaseEventTableDesc {
-
@Override
public String getTableName() {
return AuditingTypesConstants.DISTRIBUTION_DEPLOY_EVENT_TYPE;
@@ -47,6 +48,8 @@ public class DistribDeployEventTableDesc extends DistribBaseEventTableDesc {
}
+ @Getter
+ @AllArgsConstructor
enum DSEFieldsDescription {
MODIFIER("modifier", DataType.varchar(), false),
CURR_VERSION("curr_version", DataType.varchar(), false),
@@ -54,27 +57,10 @@ public class DistribDeployEventTableDesc extends DistribBaseEventTableDesc {
RESOURCE_NAME("resource_name", DataType.varchar(), false),
RESOURCE_TYPE("resource_type", DataType.varchar(), false);
- private String name;
- private DataType type;
- private boolean indexed;
-
- DSEFieldsDescription(String name, DataType type, boolean indexed) {
- this.name = name;
- this.type = type;
- this.indexed = indexed;
- }
-
- public String getName() {
- return name;
- }
-
- public DataType getType() {
- return type;
- }
+ private final String name;
+ private final DataType type;
+ private final boolean indexed;
- public boolean isIndexed() {
- return indexed;
- }
}
}
diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribDownloadEventTableDesc.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribDownloadEventTableDesc.java
index 5dc18341cc..f59347d919 100644
--- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribDownloadEventTableDesc.java
+++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribDownloadEventTableDesc.java
@@ -21,6 +21,8 @@
package org.openecomp.sdc.be.dao.cassandra.schema.tables;
import com.datastax.driver.core.DataType;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.openecomp.sdc.be.resources.data.auditing.AuditingTypesConstants;
@@ -40,31 +42,16 @@ public class DistribDownloadEventTableDesc extends DistribBaseEventTableDesc {
return AuditingTypesConstants.DISTRIBUTION_DOWNLOAD_EVENT_TYPE;
}
+ @Getter
+ @AllArgsConstructor
enum DSEFieldsDescription {
CONSUMER_ID("consumer_Id", DataType.varchar(), false),
RESOURCE_URL("resource_URL", DataType.varchar(), false);
- private String name;
- private DataType type;
- private boolean indexed;
+ private final String name;
+ private final DataType type;
+ private final boolean indexed;
- DSEFieldsDescription(String name, DataType type, boolean indexed) {
- this.name = name;
- this.type = type;
- this.indexed = indexed;
- }
-
- public String getName() {
- return name;
- }
-
- public DataType getType() {
- return type;
- }
-
- public boolean isIndexed() {
- return indexed;
- }
}
}
diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribEngineEventTableDesc.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribEngineEventTableDesc.java
index 84ebf0bc4c..650aa9b217 100644
--- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribEngineEventTableDesc.java
+++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribEngineEventTableDesc.java
@@ -21,6 +21,8 @@
package org.openecomp.sdc.be.dao.cassandra.schema.tables;
import com.datastax.driver.core.DataType;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.openecomp.sdc.be.resources.data.auditing.AuditingTypesConstants;
@@ -44,6 +46,8 @@ public class DistribEngineEventTableDesc extends DistribBaseEventTableDesc {
return AuditingTypesConstants.DISTRIBUTION_ENGINE_EVENT_TYPE;
}
+ @Getter
+ @AllArgsConstructor
enum DEEFieldsDescription {
CONSUMER_ID("consumer_id", DataType.varchar(), false),
ROLE("role", DataType.varchar(), false),
@@ -52,27 +56,10 @@ public class DistribEngineEventTableDesc extends DistribBaseEventTableDesc {
DSTATUS_TOPIC("dstatus_topic", DataType.varchar(), false),
DNOTIF_TOPIC("dnotif_topic", DataType.varchar(), false);
- private String name;
- private DataType type;
- private boolean indexed;
+ private final String name;
+ private final DataType type;
+ private final boolean indexed;
- DEEFieldsDescription(String name, DataType type, boolean indexed) {
- this.name = name;
- this.type = type;
- this.indexed = indexed;
- }
-
- public String getName() {
- return name;
- }
-
- public DataType getType() {
- return type;
- }
-
- public boolean isIndexed() {
- return indexed;
- }
}
}
diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribNotifEventTableDesc.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribNotifEventTableDesc.java
index ec9cf216f2..612a0b5741 100644
--- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribNotifEventTableDesc.java
+++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribNotifEventTableDesc.java
@@ -21,6 +21,8 @@
package org.openecomp.sdc.be.dao.cassandra.schema.tables;
import com.datastax.driver.core.DataType;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.openecomp.sdc.be.resources.data.auditing.AuditingTypesConstants;
@@ -43,6 +45,8 @@ public class DistribNotifEventTableDesc extends DistribBaseEventTableDesc {
return AuditingTypesConstants.DISTRIBUTION_NOTIFICATION_EVENT_TYPE;
}
+ @Getter
+ @AllArgsConstructor
enum DNEFieldsDescription {
TOPIC_NAME("topic_name", DataType.varchar(), false),
MODIFIER("modifier", DataType.varchar(), false),
@@ -55,27 +59,10 @@ public class DistribNotifEventTableDesc extends DistribBaseEventTableDesc {
VNF_WORKLOAD_CONTEXT("vnf_workload_context", DataType.varchar(), false),
TENANT("tenant", DataType.varchar(), false);
- private String name;
- private DataType type;
- private boolean indexed;
+ private final String name;
+ private final DataType type;
+ private final boolean indexed;
- DNEFieldsDescription(String name, DataType type, boolean indexed) {
- this.name = name;
- this.type = type;
- this.indexed = indexed;
- }
-
- public String getName() {
- return name;
- }
-
- public DataType getType() {
- return type;
- }
-
- public boolean isIndexed() {
- return indexed;
- }
}
}
diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/EcompOperationalEnvironmentEventTableDesc.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/EcompOperationalEnvironmentEventTableDesc.java
index de13daf9bb..eac2a704a6 100644
--- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/EcompOperationalEnvironmentEventTableDesc.java
+++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/EcompOperationalEnvironmentEventTableDesc.java
@@ -21,6 +21,8 @@
package org.openecomp.sdc.be.dao.cassandra.schema.tables;
import com.datastax.driver.core.DataType;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.openecomp.sdc.be.dao.cassandra.schema.ITableDescription;
import org.openecomp.sdc.be.resources.data.auditing.AuditingTypesConstants;
@@ -64,6 +66,8 @@ public class EcompOperationalEnvironmentEventTableDesc implements ITableDescript
return AuditingTypesConstants.ECOMP_OPERATIONAL_ENV_EVENT_TYPE;
}
+ @Getter
+ @AllArgsConstructor
enum EcompOpEnvFieldsDescription {
ACTION("action", DataType.varchar(), false),
OPERATIONAL_ENVIRONMENT_NAME("operational_environment_name", DataType.varchar(), false),
@@ -71,26 +75,9 @@ public class EcompOperationalEnvironmentEventTableDesc implements ITableDescript
OPERATIONAL_ENVIRONMENT_ACTION("operational_environment_action", DataType.varchar(), false),
TENANT_CONTEXT("tenant_context", DataType.varchar(), false);
- private String name;
- private DataType type;
- private boolean indexed;
+ private final String name;
+ private final DataType type;
+ private final boolean indexed;
- EcompOpEnvFieldsDescription(String name, DataType type, boolean indexed) {
- this.name = name;
- this.type = type;
- this.indexed = indexed;
- }
-
- public String getName() {
- return name;
- }
-
- public DataType getType() {
- return type;
- }
-
- public boolean isIndexed() {
- return indexed;
- }
}
}
diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/ExternalApiEventTableDesc.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/ExternalApiEventTableDesc.java
index 4a88232cd5..659bec7436 100644
--- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/ExternalApiEventTableDesc.java
+++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/ExternalApiEventTableDesc.java
@@ -21,6 +21,8 @@
package org.openecomp.sdc.be.dao.cassandra.schema.tables;
import com.datastax.driver.core.DataType;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.openecomp.sdc.be.dao.cassandra.schema.ITableDescription;
import org.openecomp.sdc.be.resources.data.auditing.AuditingTypesConstants;
@@ -66,6 +68,8 @@ public class ExternalApiEventTableDesc implements ITableDescription {
return AuditingTypesConstants.EXTERNAL_API_EVENT_TYPE;
}
+ @Getter
+ @AllArgsConstructor
enum EGAEFieldsDescription {
ACTION("action", DataType.varchar(), true),
STATUS("status", DataType.varchar(), false),
@@ -85,27 +89,10 @@ public class ExternalApiEventTableDesc implements ITableDescription {
CURR_ARTIFACT_UUID( "curr_artifact_uuid", DataType.varchar(), false),
ARTIFACT_DATA( "artifact_data", DataType.varchar(), false);
- private String name;
- private DataType type;
- private boolean indexed;
+ private final String name;
+ private final DataType type;
+ private final boolean indexed;
- EGAEFieldsDescription(String name, DataType type, boolean indexed) {
- this.name = name;
- this.type = type;
- this.indexed = indexed;
- }
-
- public String getName() {
- return name;
- }
-
- public DataType getType() {
- return type;
- }
-
- public boolean isIndexed() {
- return indexed;
- }
}
}
diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/FeatureToggleEventTableDesc.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/FeatureToggleEventTableDesc.java
index 4c18f98179..ed79f4bd2f 100644
--- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/FeatureToggleEventTableDesc.java
+++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/FeatureToggleEventTableDesc.java
@@ -22,6 +22,8 @@ package org.openecomp.sdc.be.dao.cassandra.schema.tables;
import com.datastax.driver.core.DataType;
import com.google.common.collect.Lists;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.openecomp.sdc.be.dao.cassandra.schema.ITableDescription;
import org.openecomp.sdc.be.resources.data.auditing.AuditingTypesConstants;
@@ -66,32 +68,16 @@ public class FeatureToggleEventTableDesc implements ITableDescription {
return AuditingTypesConstants.FEATURE_TOGGLE_STATE;
}
+ @Getter
+ @AllArgsConstructor
enum FeatureToggleEventFieldsDescription {
ENABLED("enabled", DataType.varchar(), false),
STRATEGY_ID("strategy_id", DataType.varchar(), false),
PARAMETERS("parameters", DataType.varchar(), false);
- private String name;
- private DataType type;
- private boolean indexed;
-
- FeatureToggleEventFieldsDescription(String name, DataType type, boolean indexed) {
- this.name = name;
- this.type = type;
- this.indexed = indexed;
- }
-
- public String getName() {
- return name;
- }
-
- public DataType getType() {
- return type;
- }
-
- public boolean isIndexed() {
- return indexed;
- }
+ private final String name;
+ private final DataType type;
+ private final boolean indexed;
}
}
diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/GetCatHierEventTableDesc.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/GetCatHierEventTableDesc.java
index e186fd206d..5765cb5912 100644
--- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/GetCatHierEventTableDesc.java
+++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/GetCatHierEventTableDesc.java
@@ -21,6 +21,8 @@
package org.openecomp.sdc.be.dao.cassandra.schema.tables;
import com.datastax.driver.core.DataType;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.openecomp.sdc.be.dao.cassandra.schema.ITableDescription;
import org.openecomp.sdc.be.resources.data.auditing.AuditingTypesConstants;
@@ -66,6 +68,8 @@ public class GetCatHierEventTableDesc implements ITableDescription {
return AuditingTypesConstants.GET_CATEGORY_HIERARCHY_EVENT_TYPE;
}
+ @Getter
+ @AllArgsConstructor
enum DEEFieldsDescription {
ACTION("action", DataType.varchar(), true),
STATUS("status", DataType.varchar(), false),
@@ -74,27 +78,10 @@ public class GetCatHierEventTableDesc implements ITableDescription {
REQUEST_ID("request_id", DataType.varchar(), false),
MODIFIER("modifier", DataType.varchar(), false);
- private String name;
- private DataType type;
- private boolean indexed;
+ private final String name;
+ private final DataType type;
+ private final boolean indexed;
- DEEFieldsDescription(String name, DataType type, boolean indexed) {
- this.name = name;
- this.type = type;
- this.indexed = indexed;
- }
-
- public String getName() {
- return name;
- }
-
- public DataType getType() {
- return type;
- }
-
- public boolean isIndexed() {
- return indexed;
- }
}
}
diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/GetUebClusterEventTableDesc.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/GetUebClusterEventTableDesc.java
index 461c9b73f6..ce2a8e9633 100644
--- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/GetUebClusterEventTableDesc.java
+++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/GetUebClusterEventTableDesc.java
@@ -21,6 +21,8 @@
package org.openecomp.sdc.be.dao.cassandra.schema.tables;
import com.datastax.driver.core.DataType;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.openecomp.sdc.be.dao.cassandra.schema.ITableDescription;
import org.openecomp.sdc.be.resources.data.auditing.AuditingTypesConstants;
@@ -67,6 +69,8 @@ public class GetUebClusterEventTableDesc implements ITableDescription {
return AuditingTypesConstants.DISTRIBUTION_GET_UEB_CLUSTER_EVENT_TYPE;
}
+ @Getter
+ @AllArgsConstructor
enum DEEFieldsDescription {
ACTION("action", DataType.varchar(), true),
STATUS("status", DataType.varchar(), false),
@@ -75,27 +79,10 @@ public class GetUebClusterEventTableDesc implements ITableDescription {
REQUEST_ID("request_Id", DataType.varchar(), false),
SERVICE_INST_ID("service_Instance_Id", DataType.varchar(), false);
- private String name;
- private DataType type;
- private boolean indexed;
+ private final String name;
+ private final DataType type;
+ private final boolean indexed;
- DEEFieldsDescription(String name, DataType type, boolean indexed) {
- this.name = name;
- this.type = type;
- this.indexed = indexed;
- }
-
- public String getName() {
- return name;
- }
-
- public DataType getType() {
- return type;
- }
-
- public boolean isIndexed() {
- return indexed;
- }
}
}
diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/GetUsersListEventTableDesc.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/GetUsersListEventTableDesc.java
index 9d1bb45459..3c3ebe7e3e 100644
--- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/GetUsersListEventTableDesc.java
+++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/GetUsersListEventTableDesc.java
@@ -21,6 +21,8 @@
package org.openecomp.sdc.be.dao.cassandra.schema.tables;
import com.datastax.driver.core.DataType;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.openecomp.sdc.be.dao.cassandra.schema.ITableDescription;
import org.openecomp.sdc.be.resources.data.auditing.AuditingTypesConstants;
@@ -66,6 +68,8 @@ public class GetUsersListEventTableDesc implements ITableDescription {
return AuditingTypesConstants.GET_USERS_LIST_EVENT_TYPE;
}
+ @Getter
+ @AllArgsConstructor
enum DEEFieldsDescription {
ACTION("action", DataType.varchar(), true),
STATUS("status", DataType.varchar(), false),
@@ -74,27 +78,10 @@ public class GetUsersListEventTableDesc implements ITableDescription {
REQUEST_ID("request_id", DataType.varchar(), false),
MODIFIER("modifier", DataType.varchar(), false);
- private String name;
- private DataType type;
- private boolean indexed;
+ private final String name;
+ private final DataType type;
+ private final boolean indexed;
- DEEFieldsDescription(String name, DataType type, boolean indexed) {
- this.name = name;
- this.type = type;
- this.indexed = indexed;
- }
-
- public String getName() {
- return name;
- }
-
- public DataType getType() {
- return type;
- }
-
- public boolean isIndexed() {
- return indexed;
- }
}
}
diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/MigrationTasksTableDescription.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/MigrationTasksTableDescription.java
index fb741b11c2..54656cbe19 100644
--- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/MigrationTasksTableDescription.java
+++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/MigrationTasksTableDescription.java
@@ -21,6 +21,8 @@
package org.openecomp.sdc.be.dao.cassandra.schema.tables;
import com.datastax.driver.core.DataType;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.openecomp.sdc.be.dao.cassandra.schema.ITableDescription;
import org.openecomp.sdc.be.resources.data.auditing.AuditingTypesConstants;
@@ -63,6 +65,8 @@ public class MigrationTasksTableDescription implements ITableDescription {
return MIGRATION_TASKS_TABLE;
}
+ @Getter
+ @AllArgsConstructor
enum SdcRepoFieldsDescription {
MAJOR_VERSION("major_version", DataType.bigint(), true),
MINOR_VERSION("minor_version", DataType.bigint(), false),
@@ -73,26 +77,9 @@ public class MigrationTasksTableDescription implements ITableDescription {
DESCRIPTION("description", DataType.varchar(), false),
EXECUTION_TIME("execution_time", DataType.cdouble(), false);
- private String fieldName;
- private boolean isIndexed;
- private DataType fieldType;
+ private final String fieldName;
+ private final DataType fieldType;
+ private final boolean isIndexed;
- SdcRepoFieldsDescription(String fieldName, DataType dataType, boolean indexed ) {
- this.fieldName = fieldName;
- this.fieldType = dataType;
- this.isIndexed = indexed;
- }
-
- public String getFieldName() {
- return fieldName;
- }
-
- public boolean isIndexed() {
- return isIndexed;
- }
-
- public DataType getFieldType() {
- return fieldType;
- }
}
}
diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/OldExternalApiEventTableDesc.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/OldExternalApiEventTableDesc.java
index c80d99ee61..f69b3ce44e 100644
--- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/OldExternalApiEventTableDesc.java
+++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/OldExternalApiEventTableDesc.java
@@ -21,6 +21,8 @@
package org.openecomp.sdc.be.dao.cassandra.schema.tables;
import com.datastax.driver.core.DataType;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.openecomp.sdc.be.dao.cassandra.schema.ITableDescription;
import org.openecomp.sdc.be.resources.data.auditing.AuditingTypesConstants;
@@ -68,6 +70,8 @@ public class OldExternalApiEventTableDesc implements ITableDescription {
return AuditingTypesConstants.EXTERNAL_API_EVENT_TYPE;
}
+ @Getter
+ @AllArgsConstructor
enum EGAEFieldsDescription {
ACTION("action", DataType.varchar(), true),
STATUS("status", DataType.varchar(), false),
@@ -87,27 +91,10 @@ public class OldExternalApiEventTableDesc implements ITableDescription {
CURR_ARTIFACT_UUID( "curr_artifact_uuid", DataType.varchar(), false),
ARTIFACT_DATA( "artifact_data", DataType.varchar(), false);
- private String name;
- private DataType type;
- private boolean indexed;
+ private final String name;
+ private final DataType type;
+ private final boolean indexed;
- EGAEFieldsDescription(String name, DataType type, boolean indexed) {
- this.name = name;
- this.type = type;
- this.indexed = indexed;
- }
-
- public String getName() {
- return name;
- }
-
- public DataType getType() {
- return type;
- }
-
- public boolean isIndexed() {
- return indexed;
- }
}
}
diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/OperationalEnvironmentsTableDescription.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/OperationalEnvironmentsTableDescription.java
index 61d0a8beb6..f924d17de5 100644
--- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/OperationalEnvironmentsTableDescription.java
+++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/OperationalEnvironmentsTableDescription.java
@@ -21,6 +21,8 @@
package org.openecomp.sdc.be.dao.cassandra.schema.tables;
import com.datastax.driver.core.DataType;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.openecomp.sdc.be.dao.cassandra.schema.ITableDescription;
import org.openecomp.sdc.be.resources.data.auditing.AuditingTypesConstants;
@@ -63,6 +65,8 @@ public class OperationalEnvironmentsTableDescription implements ITableDescriptio
return OPERATIONAL_ENVIRONMENT_TABLE;
}
+ @Getter
+ @AllArgsConstructor
enum SdcOperationalEnvironmentFieldsDescription {
//there is also PK field "environmentID"
TENANT("tenant", DataType.varchar(), false),
@@ -74,26 +78,9 @@ public class OperationalEnvironmentsTableDescription implements ITableDescriptio
STATUS("status",DataType.varchar() ,true),
LAST_MODIFIED("last_modified",DataType.timestamp() ,false);
- private String fieldName;
- private boolean isIndexed;
- private DataType fieldType;
+ private final String fieldName;
+ private final DataType fieldType;
+ private final boolean isIndexed;
- SdcOperationalEnvironmentFieldsDescription(String fieldName, DataType dataType, boolean indexed ) {
- this.fieldName = fieldName;
- this.fieldType = dataType;
- this.isIndexed = indexed;
- }
-
- public String getFieldName() {
- return fieldName;
- }
-
- public boolean isIndexed() {
- return isIndexed;
- }
-
- public DataType getFieldType() {
- return fieldType;
- }
}
}
diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/SdcSchemaFilesTableDescription.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/SdcSchemaFilesTableDescription.java
index 8f740c1c1d..b2fd87a5a4 100644
--- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/SdcSchemaFilesTableDescription.java
+++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/SdcSchemaFilesTableDescription.java
@@ -21,6 +21,8 @@
package org.openecomp.sdc.be.dao.cassandra.schema.tables;
import com.datastax.driver.core.DataType;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.openecomp.sdc.be.dao.cassandra.schema.ITableDescription;
import org.openecomp.sdc.be.resources.data.auditing.AuditingTypesConstants;
@@ -71,32 +73,17 @@ public class SdcSchemaFilesTableDescription implements ITableDescription {
public String getTableName() {
return "sdcSchemaFiles";
}
-
+
+ @Getter
+ @AllArgsConstructor
enum SdcSchemaFilesFieldsDescription {
FILE_NAME("fileName", DataType.varchar(), false),
PAYLOAD("payload", DataType.blob(), false),
CHECKSUM("checksum", DataType.varchar(), false);
- private String name;
- private DataType type;
- private boolean indexed;
+ private final String name;
+ private final DataType type;
+ private final boolean indexed;
- SdcSchemaFilesFieldsDescription(String name, DataType type, boolean indexed) {
- this.name = name;
- this.type = type;
- this.indexed = indexed;
- }
-
- public String getName() {
- return name;
- }
-
- public DataType getType() {
- return type;
- }
-
- public boolean isIndexed() {
- return indexed;
- }
}
}
diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/UserAccessEventTableDescription.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/UserAccessEventTableDescription.java
index 4e778b8c43..5186c7eef9 100644
--- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/UserAccessEventTableDescription.java
+++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/UserAccessEventTableDescription.java
@@ -22,14 +22,15 @@ package org.openecomp.sdc.be.dao.cassandra.schema.tables;
import com.datastax.driver.core.DataType;
import com.datastax.driver.mapping.annotations.Column;
-import org.apache.commons.lang3.tuple.ImmutablePair;
-import org.openecomp.sdc.be.dao.cassandra.schema.ITableDescription;
-import org.openecomp.sdc.be.resources.data.auditing.AuditingTypesConstants;
-
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import org.apache.commons.lang3.tuple.ImmutablePair;
+import org.openecomp.sdc.be.dao.cassandra.schema.ITableDescription;
+import org.openecomp.sdc.be.resources.data.auditing.AuditingTypesConstants;
public class UserAccessEventTableDescription implements ITableDescription {
@Override
@@ -67,36 +68,20 @@ public class UserAccessEventTableDescription implements ITableDescription {
return AuditingTypesConstants.USER_ACCESS_EVENT_TYPE;
}
+ @Getter
+ @AllArgsConstructor
enum UAEFieldsDescription {
- REQUEST_ID("request_Id", DataType.varchar(), false), USER("USER", DataType.varchar(), false), ACTION("action",
- DataType.varchar(), true), STATUS("status", DataType.varchar(), false), DESCRIPTION("description",
- DataType.varchar(),
- false), SERVICE_INSTANCE_ID("service_instance_id", DataType.varchar(), false);
-
- @Column
- private String modifier;
+ REQUEST_ID("request_Id", DataType.varchar(), false),
+ USER("USER", DataType.varchar(), false),
+ ACTION("action", DataType.varchar(), true),
+ STATUS("status", DataType.varchar(), false),
+ DESCRIPTION("description", DataType.varchar(), false),
+ SERVICE_INSTANCE_ID("service_instance_id", DataType.varchar(), false);
- private String name;
- private DataType type;
- private boolean indexed;
+ private final String name;
+ private final DataType type;
+ private final boolean indexed;
- UAEFieldsDescription(String name, DataType type, boolean indexed) {
- this.name = name;
- this.type = type;
- this.indexed = indexed;
- }
-
- public String getName() {
- return name;
- }
-
- public DataType getType() {
- return type;
- }
-
- public boolean isIndexed() {
- return indexed;
- }
}
}