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.PartitionKey;
 
  25 import com.datastax.driver.mapping.annotations.Table;
 
  26 import org.openecomp.sdc.versioning.dao.types.Version;
 
  28 import java.nio.ByteBuffer;
 
  31 @Table(keyspace = "dox", name = "package_details")
 
  32 public class PackageInfo {
 
  36   @Column(name = "vsp_id")
 
  39   @PartitionKey(value = 1)
 
  40   private String version;
 
  42   @Column(name = "display_name")
 
  43   private String displayName;
 
  45   @Column(name = "vsp_name")
 
  46   private String vspName;
 
  48   @Column(name = "vsp_description")
 
  49   private String vspDescription;
 
  51   @Column(name = "vendor_name")
 
  52   private String vendorName;
 
  54   private String category;
 
  56   @Column(name = "sub_category")
 
  57   private String subCategory;
 
  59   @Column(name = "vendor_release")
 
  60   private String vendorRelease;
 
  62   @Column(name = "package_checksum")
 
  63   private String packageChecksum;
 
  65   @Column(name = "package_type")
 
  66   private String packageType;
 
  68   @Column(name = "translate_content")
 
  69   private ByteBuffer translatedFile;
 
  71   public PackageInfo() {
 
  74   public PackageInfo(String packageId, Version version) {
 
  75     this.vspId = packageId;
 
  76     this.version = version.getName();
 
  79   public String getDisplayName() {
 
  83   public void setDisplayName(String displayName) {
 
  84     this.displayName = displayName;
 
  87   public String getVspDescription() {
 
  88     return vspDescription;
 
  91   public void setVspDescription(String vspDescription) {
 
  92     this.vspDescription = vspDescription;
 
  95   public String getVersion() {
 
  99   public void setVersion(String version) {
 
 100     this.version = version;
 
 103   public String getVspId() {
 
 107   public void setVspId(String vspId) {
 
 111   public String getCategory() {
 
 115   public void setCategory(String category) {
 
 116     this.category = category;
 
 119   public String getSubCategory() {
 
 123   public void setSubCategory(String subCategory) {
 
 124     this.subCategory = subCategory;
 
 127   public String getVendorName() {
 
 131   public void setVendorName(String vendorName) {
 
 132     this.vendorName = vendorName;
 
 135   public String getVendorRelease() {
 
 136     return vendorRelease;
 
 139   public void setVendorRelease(String vendorRelease) {
 
 140     this.vendorRelease = vendorRelease;
 
 143   public String getPackageChecksum() {
 
 144     return packageChecksum;
 
 147   public void setPackageChecksum(String packageChecksum) {
 
 148     this.packageChecksum = packageChecksum;
 
 151   public String getPackageType() {
 
 155   public void setPackageType(String packageType) {
 
 156     this.packageType = packageType;
 
 159   public ByteBuffer getTranslatedFile() {
 
 160     return translatedFile;
 
 163   public void setTranslatedFile(ByteBuffer translatedFile) {
 
 164     this.translatedFile = translatedFile;
 
 167   public String getVspName() {
 
 171   public void setVspName(String vendorName) {
 
 172     this.vspName = vendorName;