aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types')
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/EnrichedServiceArtifactEntity.java17
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/EnrichedServiceTemplateEntity.java17
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceArtifact.java5
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceArtifactEntity.java19
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceElement.java2
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceElementEntity.java13
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceTemplate.java2
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceTemplateEntity.java17
8 files changed, 37 insertions, 55 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/EnrichedServiceArtifactEntity.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/EnrichedServiceArtifactEntity.java
index fbe0bb5362..d47ec10f2c 100644
--- a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/EnrichedServiceArtifactEntity.java
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/EnrichedServiceArtifactEntity.java
@@ -13,16 +13,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package org.openecomp.core.model.types;
-import com.datastax.driver.mapping.annotations.*;
+import com.datastax.driver.mapping.annotations.ClusteringColumn;
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.Frozen;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
import com.google.common.io.ByteStreams;
-import org.openecomp.sdc.common.errors.SdcRuntimeException;
-import org.openecomp.sdc.versioning.dao.types.Version;
-
import java.io.IOException;
import java.nio.ByteBuffer;
+import org.openecomp.sdc.common.errors.SdcRuntimeException;
+import org.openecomp.sdc.versioning.dao.types.Version;
@Table(keyspace = "dox", name = "vsp_enriched_service_artifact")
public class EnrichedServiceArtifactEntity implements ServiceElementEntity {
@@ -36,15 +38,12 @@ public class EnrichedServiceArtifactEntity implements ServiceElementEntity {
@PartitionKey
@Column(name = "vsp_id")
public String id;
-
@PartitionKey(value = 1)
@Frozen
public Version version;
-
@ClusteringColumn
@Column(name = "name")
public String name;
-
@Column(name = "content_data")
public ByteBuffer contentData;
@@ -66,13 +65,11 @@ public class EnrichedServiceArtifactEntity implements ServiceElementEntity {
this.id = entity.getVspId();
this.version = entity.getVersion();
this.name = entity.getName();
-
try {
this.contentData = ByteBuffer.wrap(ByteStreams.toByteArray(entity.getContent()));
} catch (IOException ioException) {
throw new SdcRuntimeException(ioException);
}
-
}
@Override
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/EnrichedServiceTemplateEntity.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/EnrichedServiceTemplateEntity.java
index aa6abbed75..8301df73c7 100644
--- a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/EnrichedServiceTemplateEntity.java
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/EnrichedServiceTemplateEntity.java
@@ -13,16 +13,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package org.openecomp.core.model.types;
-import com.datastax.driver.mapping.annotations.*;
+import com.datastax.driver.mapping.annotations.ClusteringColumn;
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.Frozen;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
import com.google.common.io.ByteStreams;
-import org.openecomp.sdc.common.errors.SdcRuntimeException;
-import org.openecomp.sdc.versioning.dao.types.Version;
-
import java.io.IOException;
import java.nio.ByteBuffer;
+import org.openecomp.sdc.common.errors.SdcRuntimeException;
+import org.openecomp.sdc.versioning.dao.types.Version;
@Table(keyspace = "dox", name = "vsp_enriched_service_template")
public class EnrichedServiceTemplateEntity implements ServiceElementEntity {
@@ -36,18 +38,14 @@ public class EnrichedServiceTemplateEntity implements ServiceElementEntity {
@PartitionKey
@Column(name = "vsp_id")
public String id;
-
@PartitionKey(value = 1)
@Frozen
public Version version;
-
@ClusteringColumn
@Column(name = "name")
public String name;
-
@Column(name = "content_data")
public ByteBuffer contentData;
-
@Column(name = "base_name")
private String baseName;
@@ -75,7 +73,6 @@ public class EnrichedServiceTemplateEntity implements ServiceElementEntity {
} catch (IOException ioException) {
throw new SdcRuntimeException(ioException);
}
-
}
public String getBaseName() {
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceArtifact.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceArtifact.java
index 184704b094..bb6f4b5574 100644
--- a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceArtifact.java
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceArtifact.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,7 +17,6 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
package org.openecomp.core.model.types;
import lombok.NoArgsConstructor;
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceArtifactEntity.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceArtifactEntity.java
index 0709371d94..bfab42f8ee 100644
--- a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceArtifactEntity.java
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceArtifactEntity.java
@@ -13,19 +13,22 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package org.openecomp.core.model.types;
-import com.datastax.driver.mapping.annotations.*;
+import com.datastax.driver.mapping.annotations.ClusteringColumn;
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.Frozen;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
import com.google.common.io.ByteStreams;
-import org.openecomp.sdc.common.errors.SdcRuntimeException;
-import org.openecomp.sdc.versioning.dao.types.Version;
-
import java.io.IOException;
import java.nio.ByteBuffer;
+import org.openecomp.sdc.common.errors.SdcRuntimeException;
+import org.openecomp.sdc.versioning.dao.types.Version;
@Table(keyspace = "dox", name = "vsp_service_artifact")
public class ServiceArtifactEntity implements ServiceElementEntity {
+
private static final String ENTITY_TYPE;
static {
@@ -35,15 +38,12 @@ public class ServiceArtifactEntity implements ServiceElementEntity {
@PartitionKey
@Column(name = "vsp_id")
public String id;
-
@PartitionKey(value = 1)
@Frozen
public Version version;
-
@ClusteringColumn
@Column(name = "name")
public String name;
-
@Column(name = "content_data")
public ByteBuffer contentData;
@@ -65,13 +65,11 @@ public class ServiceArtifactEntity implements ServiceElementEntity {
this.id = entity.getVspId();
this.version = entity.getVersion();
this.name = entity.getName();
-
try {
this.contentData = ByteBuffer.wrap(ByteStreams.toByteArray(entity.getContent()));
} catch (IOException ioException) {
throw new SdcRuntimeException(ioException);
}
-
}
@Override
@@ -130,5 +128,4 @@ public class ServiceArtifactEntity implements ServiceElementEntity {
serviceArtifact.setVspId(this.getId());
return serviceArtifact;
}
-
}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceElement.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceElement.java
index 817cfa9d44..f598c4b225 100644
--- a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceElement.java
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceElement.java
@@ -17,7 +17,6 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
package org.openecomp.core.model.types;
import java.io.ByteArrayInputStream;
@@ -48,5 +47,4 @@ public class ServiceElement {
}
return new ByteArrayInputStream(contentData);
}
-
}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceElementEntity.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceElementEntity.java
index 02249039f8..716e140fc8 100644
--- a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceElementEntity.java
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceElementEntity.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,15 +17,14 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
package org.openecomp.core.model.types;
-import org.openecomp.sdc.versioning.dao.types.VersionableEntity;
-
import java.nio.ByteBuffer;
+import org.openecomp.sdc.versioning.dao.types.VersionableEntity;
public interface ServiceElementEntity extends VersionableEntity {
- String getName();
- ByteBuffer getContentData();
+ String getName();
+
+ ByteBuffer getContentData();
}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceTemplate.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceTemplate.java
index 479502e8f9..14bdb0869f 100644
--- a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceTemplate.java
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceTemplate.java
@@ -17,7 +17,6 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
package org.openecomp.core.model.types;
import lombok.Getter;
@@ -30,5 +29,4 @@ import lombok.Setter;
public class ServiceTemplate extends ServiceElement {
private String baseName;
-
}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceTemplateEntity.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceTemplateEntity.java
index 80f0cfb371..48b539ec5f 100644
--- a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceTemplateEntity.java
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceTemplateEntity.java
@@ -13,16 +13,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package org.openecomp.core.model.types;
-import com.datastax.driver.mapping.annotations.*;
+import com.datastax.driver.mapping.annotations.ClusteringColumn;
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.Frozen;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
import com.google.common.io.ByteStreams;
-import org.openecomp.sdc.common.errors.SdcRuntimeException;
-import org.openecomp.sdc.versioning.dao.types.Version;
-
import java.io.IOException;
import java.nio.ByteBuffer;
+import org.openecomp.sdc.common.errors.SdcRuntimeException;
+import org.openecomp.sdc.versioning.dao.types.Version;
@Table(keyspace = "dox", name = "vsp_service_template")
public class ServiceTemplateEntity implements ServiceElementEntity {
@@ -36,18 +38,14 @@ public class ServiceTemplateEntity implements ServiceElementEntity {
@PartitionKey
@Column(name = "vsp_id")
public String id;
-
@PartitionKey(value = 1)
@Frozen
public Version version;
-
@ClusteringColumn
@Column(name = "name")
public String name;
-
@Column(name = "content_data")
public ByteBuffer contentData;
-
@Column(name = "base_name")
private String baseName;
@@ -75,7 +73,6 @@ public class ServiceTemplateEntity implements ServiceElementEntity {
} catch (IOException ioException) {
throw new SdcRuntimeException(ioException);
}
-
}
public String getBaseName() {