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;
72 * Every entity class must have a default constructor according to
73 * <a href="http://docs.datastax.com/en/developer/java-driver/2.1/manual/object_mapper/creating/">
74 * Definition of mapped classes</a>.
76 public PackageInfo() {
77 // Don't delete! Default constructor is required by DataStax driver
80 public PackageInfo(String packageId, Version version) {
81 this.vspId = packageId;
82 this.version = version.getName();
85 public String getDisplayName() {
89 public void setDisplayName(String displayName) {
90 this.displayName = displayName;
93 public String getVspDescription() {
94 return vspDescription;
97 public void setVspDescription(String vspDescription) {
98 this.vspDescription = vspDescription;
101 public String getVersion() {
105 public void setVersion(String version) {
106 this.version = version;
109 public String getVspId() {
113 public void setVspId(String vspId) {
117 public String getCategory() {
121 public void setCategory(String category) {
122 this.category = category;
125 public String getSubCategory() {
129 public void setSubCategory(String subCategory) {
130 this.subCategory = subCategory;
133 public String getVendorName() {
137 public void setVendorName(String vendorName) {
138 this.vendorName = vendorName;
141 public String getVendorRelease() {
142 return vendorRelease;
145 public void setVendorRelease(String vendorRelease) {
146 this.vendorRelease = vendorRelease;
149 public String getPackageChecksum() {
150 return packageChecksum;
153 public void setPackageChecksum(String packageChecksum) {
154 this.packageChecksum = packageChecksum;
157 public String getPackageType() {
161 public void setPackageType(String packageType) {
162 this.packageType = packageType;
165 public ByteBuffer getTranslatedFile() {
166 return translatedFile;
169 public void setTranslatedFile(ByteBuffer translatedFile) {
170 this.translatedFile = translatedFile;
173 public String getVspName() {
177 public void setVspName(String vendorName) {
178 this.vspName = vendorName;