2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
23 import com.datastax.driver.mapping.annotations.ClusteringColumn;
24 import com.datastax.driver.mapping.annotations.Column;
25 import com.datastax.driver.mapping.annotations.Frozen;
26 import com.datastax.driver.mapping.annotations.PartitionKey;
27 import com.datastax.driver.mapping.annotations.Table;
28 import org.openecomp.core.enrichment.types.MonitoringUploadType;
29 import org.openecomp.sdc.versioning.dao.types.Version;
30 import org.openecomp.sdc.versioning.dao.types.VersionableEntity;
32 import java.nio.ByteBuffer;
34 @Table(keyspace = "dox", name = "vsp_component_artifact")
35 public class ComponentMonitoringUploadEntity implements VersionableEntity {
36 public static final String ENTITY_TYPE = "Vendor Software Product Component Artifact";
38 @Column(name = "vsp_id")
40 @PartitionKey(value = 1)
42 private Version version;
44 @Column(name = "component_id")
45 private String componentId;
46 @ClusteringColumn(value = 1)
47 @Column(name = "artifact_type")
48 private MonitoringUploadType type;
49 @ClusteringColumn(value = 2)
50 @Column(name = "artifact_id")
52 @Column(name = "name")
53 private String artifactName;
54 private ByteBuffer artifact;
56 public ComponentMonitoringUploadEntity() {
61 * Instantiates a new Component artifact entity.
63 * @param vspId the vsp id
64 * @param version the version
65 * @param componentId the component id
68 public ComponentMonitoringUploadEntity(String vspId, Version version, String componentId,
71 this.version = version;
72 this.componentId = componentId;
76 public String getVspId() {
80 public void setVspId(String vspId) {
84 public String getComponentId() {
88 public void setComponentId(String componentId) {
89 this.componentId = componentId;
93 public String getEntityType() {
98 public String getFirstClassCitizenId() {
102 public String getId() {
106 public void setId(String id) {
110 public Version getVersion() {
114 public void setVersion(Version version) {
115 this.version = version;
118 public String getArtifactName() {
122 public void setArtifactName(String artifactName) {
123 this.artifactName = artifactName;
126 public ByteBuffer getArtifact() {
130 public void setArtifact(ByteBuffer artifact) {
131 this.artifact = artifact;
134 public MonitoringUploadType getType() {
138 public void setType(MonitoringUploadType type) {
143 public String toString() {
144 return "ComponentMonitoringUploadEntity{" +
145 "vspId='" + vspId + '\'' +
146 ", version=" + version +
147 ", componentId='" + componentId + '\'' +
149 ", id='" + id + '\'' +
150 ", artifactName='" + artifactName + '\'' +