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;
 
  51   public OrchestrationTemplateCandidateDataEntity() {
 
  55    * Instantiates a new OrchestrationTemplateCandidateDataEntity.
 
  58    * @param version     the Version
 
  61   public OrchestrationTemplateCandidateDataEntity(String id, Version version) {
 
  63     this.version = version;
 
  67    * Instantiates a new OrchestrationTemplateCandidateDataEntity.
 
  69    * @param filesDataStructure       the files data Structure
 
  70    * @param version     the version
 
  71    * @param contentData the contentData
 
  74   public OrchestrationTemplateCandidateDataEntity(String id, Version version,
 
  75                                                   ByteBuffer contentData,
 
  76                                                   String filesDataStructure) {
 
  78     this.contentData = contentData;
 
  79     this.filesDataStructure = filesDataStructure;
 
  80     this.version = version;
 
  84   public String getEntityType() {
 
  89   public String getFirstClassCitizenId() {
 
  93   public String getId() {
 
  97   public void setId(String id) {
 
 102   public Version getVersion() {
 
 107   public void setVersion(Version version) {
 
 108     this.version = version;
 
 111   public ByteBuffer getContentData() {
 
 115   public void setContentData(ByteBuffer contentData) {
 
 116     this.contentData = contentData;
 
 119   public String getFilesDataStructure() {
 
 120     return filesDataStructure;
 
 123   public void setFilesDataStructure(String filesDataStructure) {
 
 124     this.filesDataStructure = filesDataStructure;