[SDC-31] add mising script got Comformance fix
[sdc.git] / catalog-dao / src / main / java / org / openecomp / sdc / be / resources / data / ESSdcSchemaFilesData.java
1 package org.openecomp.sdc.be.resources.data;
2
3 import java.nio.ByteBuffer;
4 import java.util.Date;
5
6 import com.datastax.driver.mapping.annotations.Column;
7 import com.datastax.driver.mapping.annotations.Table;
8
9 @Table(keyspace = "sdcartifact", name = "sdcschemafiles")
10 public class ESSdcSchemaFilesData {
11                 
12         @Column(name = "sdcreleasenum")
13         private String sdcReleaseNum;
14
15         @Column(name = "timestamp")
16         private Date timestamp;
17
18         @Column(name = "conformanceLevel")
19         private String conformanceLevel;
20
21         @Column(name = "fileName")
22         private String fileName;
23
24         @Column(name = "payload")
25         private ByteBuffer payload;
26         
27         @Column(name = "checksum")
28         private String checksum;
29         
30         public ESSdcSchemaFilesData() {
31         
32         }
33         
34         public ESSdcSchemaFilesData(String sdcReleaseNum, String conformanceLevel, String fileName, byte[] payload){
35                 this.sdcReleaseNum = sdcReleaseNum;
36                 this.conformanceLevel = conformanceLevel;
37                 this.fileName = fileName;
38                 if(payload != null) {
39                         this.payload = ByteBuffer.wrap(payload.clone());
40                 }
41         }
42
43         public String getSdcReleaseNum() {
44                 return sdcReleaseNum;
45         }
46
47         public void setSdcReleaseNum(String sdcReleaseNum) {
48                 this.sdcReleaseNum = sdcReleaseNum;
49         }
50
51         public String getConformanceLevel() {
52                 return conformanceLevel;
53         }
54
55         public void setConformanceLevel(String conformanceLevel) {
56                 this.conformanceLevel = conformanceLevel;
57         }
58
59         public String getFileName() {
60                 return fileName;
61         }
62
63         public void setFileName(String fileName) {
64                 this.fileName = fileName;
65         }
66
67         public ByteBuffer getPayload() {
68                 return payload;
69         }
70
71         public void setPayload(ByteBuffer payload) {
72                 if(payload != null){
73                         this.payload = payload.duplicate();
74                 }
75         }
76         
77         public void setPayloadAsArray(byte[] payload) {
78                 if(payload != null){
79                         this.payload = ByteBuffer.wrap(payload.clone());
80                 }
81         }
82         
83         public byte[] getPayloadAsArray() {
84                 return payload != null ? payload.array() : null;
85         }
86
87         public Date getTimestamp() {
88                 return timestamp;
89         }
90
91         public void setTimestamp(Date timestamp) {
92                 this.timestamp = timestamp;
93         }
94
95         public String getChecksum() {
96                 return checksum;
97         }
98
99         public void setChecksum(String checksum) {
100                 this.checksum = checksum;
101         }
102 }