Migrate "ms/controllerblueprints" from ccsdk/apps
[ccsdk/cds.git] / ms / controllerblueprints / modules / service / src / main / java / org / onap / ccsdk / cds / controllerblueprints / service / domain / BlueprintModelSearch.java
1 /*
2  * Copyright © 2017-2018 AT&T Intellectual Property.
3  * Modifications Copyright © 2019 Bell Canada.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17
18 package org.onap.ccsdk.cds.controllerblueprints.service.domain;
19
20 import com.fasterxml.jackson.annotation.JsonFormat;
21 import com.fasterxml.jackson.annotation.JsonTypeInfo;
22 import com.fasterxml.jackson.annotation.JsonTypeName;
23 import org.springframework.data.annotation.LastModifiedDate;
24
25 import javax.persistence.*;
26 import java.io.Serializable;
27 import java.util.Date;
28
29 @Entity
30 @Table(name = "CONFIG_MODEL")
31 @JsonTypeName("blueprintModel")
32 @JsonTypeInfo(include= JsonTypeInfo.As.WRAPPER_OBJECT, use=JsonTypeInfo.Id.NAME)
33 public class BlueprintModelSearch implements Serializable {
34     private static final long serialVersionUID = 1L;
35
36     @Id
37     @Column(name = "config_model_id")
38     private String id;
39
40     @Column(name = "artifact_uuid")
41     private String artifactUUId;
42
43     @Column(name = "artifact_type")
44     private String artifactType;
45
46     @Column(name = "artifact_version", nullable = false)
47     private String artifactVersion;
48
49     @Lob
50     @Column(name = "artifact_description")
51     private String artifactDescription;
52
53     @Column(name = "internal_version")
54     private Integer internalVersion;
55
56     @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
57     @LastModifiedDate
58     @Temporal(TemporalType.TIMESTAMP)
59     @Column(name = "creation_date")
60     private Date createdDate = new Date();
61
62     @Column(name = "artifact_name", nullable = false)
63     private String artifactName;
64
65     @Column(name = "published", nullable = false)
66     private String published;
67
68     @Column(name = "updated_by", nullable = false)
69     private String updatedBy;
70
71     @Lob
72     @Column(name = "tags", nullable = false)
73     private String tags;
74
75     public String getId() {
76         return id;
77     }
78
79     public void setId(String id) {
80         this.id = id;
81     }
82
83     public String getArtifactUUId() {
84         return artifactUUId;
85     }
86
87     public void setArtifactUUId(String artifactUUId) {
88         this.artifactUUId = artifactUUId;
89     }
90
91     public String getArtifactType() {
92         return artifactType;
93     }
94
95     public void setArtifactType(String artifactType) {
96         this.artifactType = artifactType;
97     }
98
99     public String getArtifactVersion() {
100         return artifactVersion;
101     }
102
103     public void setArtifactVersion(String artifactVersion) {
104         this.artifactVersion = artifactVersion;
105     }
106
107     public String getArtifactDescription() {
108         return artifactDescription;
109     }
110
111     public void setArtifactDescription(String artifactDescription) {
112         this.artifactDescription = artifactDescription;
113     }
114
115     public Integer getInternalVersion() {
116         return internalVersion;
117     }
118
119     public void setInternalVersion(Integer internalVersion) {
120         this.internalVersion = internalVersion;
121     }
122
123     public Date getCreatedDate() {
124         return createdDate;
125     }
126
127     public void setCreatedDate(Date createdDate) {
128         this.createdDate = createdDate;
129     }
130
131     public String getArtifactName() {
132         return artifactName;
133     }
134
135     public void setArtifactName(String artifactName) {
136         this.artifactName = artifactName;
137     }
138
139     public String getPublished() {
140         return published;
141     }
142
143     public void setPublished(String published) {
144         this.published = published;
145     }
146
147     public String getUpdatedBy() {
148         return updatedBy;
149     }
150
151     public void setUpdatedBy(String updatedBy) {
152         this.updatedBy = updatedBy;
153     }
154
155     public String getTags() {
156         return tags;
157     }
158
159     public void setTags(String tags) {
160         this.tags = tags;
161     }
162
163     public static long getSerialversionuid() {
164         return serialVersionUID;
165     }
166 }