9c751a239d3d58f19ffb7e1a45be55833539f028
[sdc.git] /
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
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
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
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=========================================================
19  */
20 package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
21
22 import com.datastax.driver.mapping.annotations.Column;
23 import com.datastax.driver.mapping.annotations.PartitionKey;
24 import com.datastax.driver.mapping.annotations.Table;
25 import java.nio.ByteBuffer;
26 import lombok.Data;
27 import lombok.NoArgsConstructor;
28 import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum;
29 import org.openecomp.sdc.versioning.dao.types.Version;
30
31 @Data
32 @NoArgsConstructor
33 @Table(keyspace = "dox", name = "package_details")
34 public class PackageInfo {
35
36     @PartitionKey
37     @Column(name = "vsp_id")
38     private String vspId;
39     @PartitionKey(value = 1)
40     private String version;
41     @Column(name = "display_name")
42     private String displayName;
43     @Column(name = "vsp_name")
44     private String vspName;
45     @Column(name = "vsp_description")
46     private String vspDescription;
47     @Column(name = "vendor_name")
48     private String vendorName;
49     private String category;
50     @Column(name = "sub_category")
51     private String subCategory;
52     @Column(name = "vendor_release")
53     private String vendorRelease;
54     @Column(name = "package_checksum")
55     private String packageChecksum;
56     @Column(name = "package_type")
57     private String packageType;
58     @Column(name = "translate_content")
59     private ByteBuffer translatedFile;
60     @Column(name = "resource_type")
61     private String resourceType = ResourceTypeEnum.VF.name();
62
63     public PackageInfo(String packageId, Version version) {
64         this.vspId = packageId;
65         this.version = version.getName();
66     }
67 }