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.Column;
24 import com.datastax.driver.mapping.annotations.Frozen;
25 import com.datastax.driver.mapping.annotations.PartitionKey;
26 import com.datastax.driver.mapping.annotations.Table;
27 import org.openecomp.sdc.versioning.dao.types.Version;
28 import org.openecomp.sdc.versioning.dao.types.VersionableEntity;
30 import java.nio.ByteBuffer;
32 @Table(keyspace = "dox", name = "vsp_orchestration_template_candidate")
33 public class OrchestrationTemplateCandidateDataEntity implements VersionableEntity {
34 private static final String ENTITY_TYPE =
35 "Vendor Software Product Upload Orchestration_candidate data";
38 @Column(name = "vsp_id")
41 @PartitionKey(value = 1)
43 private Version version;
45 @Column(name = "content_data")
46 private ByteBuffer contentData;
48 @Column(name = "files_data_structure")
49 private String filesDataStructure;
52 * Every entity class must have a default constructor according to
53 * <a href="http://docs.datastax.com/en/developer/java-driver/2.1/manual/object_mapper/creating/">
54 * Definition of mapped classes</a>.
56 public OrchestrationTemplateCandidateDataEntity() {
57 // Don't delete! Default constructor is required by DataStax driver
61 * Instantiates a new OrchestrationTemplateCandidateDataEntity.
64 * @param version the Version
67 public OrchestrationTemplateCandidateDataEntity(String id, Version version) {
69 this.version = version;
73 * Instantiates a new OrchestrationTemplateCandidateDataEntity.
75 * @param filesDataStructure the files data Structure
76 * @param version the version
77 * @param contentData the contentData
80 public OrchestrationTemplateCandidateDataEntity(String id, Version version,
81 ByteBuffer contentData,
82 String filesDataStructure) {
84 this.contentData = contentData;
85 this.filesDataStructure = filesDataStructure;
86 this.version = version;
90 public String getEntityType() {
95 public String getFirstClassCitizenId() {
99 public String getId() {
103 public void setId(String id) {
108 public Version getVersion() {
113 public void setVersion(Version version) {
114 this.version = version;
117 public ByteBuffer getContentData() {
121 public void setContentData(ByteBuffer contentData) {
122 this.contentData = contentData;
125 public String getFilesDataStructure() {
126 return filesDataStructure;
129 public void setFilesDataStructure(String filesDataStructure) {
130 this.filesDataStructure = filesDataStructure;