2 * Copyright © 2017-2018 AT&T Intellectual Property.
3 * Modifications Copyright © 2019 Bell Canada.
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
9 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 package org.onap.ccsdk.cds.controllerblueprints.service.domain;
20 import com.fasterxml.jackson.annotation.JsonFormat;
21 import io.swagger.annotations.ApiModelProperty;
22 import org.hibernate.annotations.Proxy;
23 import org.springframework.data.annotation.LastModifiedDate;
24 import org.springframework.data.jpa.domain.support.AuditingEntityListener;
26 import javax.persistence.*;
27 import java.io.Serializable;
28 import java.util.Date;
31 * BlueprintModel.java Purpose: Provide Configuration Generator BlueprintModel Entity
33 * @author Brinda Santh
37 @EntityListeners({AuditingEntityListener.class})
39 @Table(name = "CONFIG_MODEL", uniqueConstraints=@UniqueConstraint(columnNames={"artifact_name","artifact_version"}))
41 public class BlueprintModel implements Serializable {
42 private static final long serialVersionUID = 1L;
44 @Column(name = "config_model_id")
47 @Column(name = "service_uuid")
48 private String serviceUUID;
50 @Column(name = "distribution_id")
51 private String distributionId;
53 @Column(name = "service_name")
54 private String serviceName;
56 @Column(name = "service_description")
57 private String serviceDescription;
59 @Column(name = "resource_uuid")
60 private String resourceUUID;
62 @Column(name = "resource_instance_name")
63 private String resourceInstanceName;
65 @Column(name = "resource_name")
66 private String resourceName;
68 @Column(name = "resource_version")
69 private String resourceVersion;
71 @Column(name = "resource_type")
72 private String resourceType;
74 @Column(name = "artifact_uuid")
75 private String artifactUUId;
77 @Column(name = "artifact_type")
78 private String artifactType;
80 @Column(name = "artifact_version", nullable = false)
81 @ApiModelProperty(required=true)
82 private String artifactVersion;
85 @Column(name = "artifact_description")
86 private String artifactDescription;
88 @Column(name = "internal_version")
89 private Integer internalVersion;
91 @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
93 @Temporal(TemporalType.TIMESTAMP)
94 @Column(name = "creation_date")
95 private Date createdDate = new Date();
97 @Column(name = "artifact_name", nullable = false)
98 @ApiModelProperty(required=true)
99 private String artifactName;
101 @Column(name = "published", nullable = false)
102 @ApiModelProperty(required=true)
103 private String published;
105 @Column(name = "updated_by", nullable = false)
106 @ApiModelProperty(required=true)
107 private String updatedBy;
110 @Column(name = "tags", nullable = false)
111 @ApiModelProperty(required=true)
114 @OneToOne(mappedBy = "blueprintModel", fetch = FetchType.EAGER, orphanRemoval = true, cascade = CascadeType.ALL)
115 private org.onap.ccsdk.cds.controllerblueprints.service.domain.BlueprintModelContent blueprintModelContent;
117 public String getId() {
121 public void setId(String id) {
125 public String getServiceUUID() {
129 public void setServiceUUID(String serviceUUID) {
130 this.serviceUUID = serviceUUID;
133 public String getDistributionId() {
134 return distributionId;
137 public void setDistributionId(String distributionId) {
138 this.distributionId = distributionId;
141 public String getServiceName() {
145 public void setServiceName(String serviceName) {
146 this.serviceName = serviceName;
149 public String getServiceDescription() {
150 return serviceDescription;
153 public void setServiceDescription(String serviceDescription) {
154 this.serviceDescription = serviceDescription;
157 public String getResourceUUID() {
161 public void setResourceUUID(String resourceUUID) {
162 this.resourceUUID = resourceUUID;
165 public String getResourceInstanceName() {
166 return resourceInstanceName;
169 public void setResourceInstanceName(String resourceInstanceName) {
170 this.resourceInstanceName = resourceInstanceName;
173 public String getResourceName() {
177 public void setResourceName(String resourceName) {
178 this.resourceName = resourceName;
181 public String getResourceVersion() {
182 return resourceVersion;
185 public void setResourceVersion(String resourceVersion) {
186 this.resourceVersion = resourceVersion;
189 public String getResourceType() {
193 public void setResourceType(String resourceType) {
194 this.resourceType = resourceType;
197 public String getArtifactUUId() {
201 public void setArtifactUUId(String artifactUUId) {
202 this.artifactUUId = artifactUUId;
205 public String getArtifactType() {
209 public void setArtifactType(String artifactType) {
210 this.artifactType = artifactType;
213 public String getArtifactVersion() {
214 return artifactVersion;
217 public void setArtifactVersion(String artifactVersion) {
218 this.artifactVersion = artifactVersion;
221 public String getArtifactDescription() {
222 return artifactDescription;
225 public void setArtifactDescription(String artifactDescription) {
226 this.artifactDescription = artifactDescription;
229 public Integer getInternalVersion() {
230 return internalVersion;
233 public void setInternalVersion(Integer internalVersion) {
234 this.internalVersion = internalVersion;
237 public Date getCreatedDate() {
241 public void setCreatedDate(Date createdDate) {
242 this.createdDate = createdDate;
245 public String getArtifactName() {
249 public void setArtifactName(String artifactName) {
250 this.artifactName = artifactName;
253 public String getPublished() {
257 public void setPublished(String published) {
258 this.published = published;
261 public String getUpdatedBy() {
265 public void setUpdatedBy(String updatedBy) {
266 this.updatedBy = updatedBy;
269 public String getTags() {
273 public void setTags(String tags) {
277 public org.onap.ccsdk.cds.controllerblueprints.service.domain.BlueprintModelContent getBlueprintModelContent() {
278 return blueprintModelContent;
281 public void setBlueprintModelContent(
282 org.onap.ccsdk.cds.controllerblueprints.service.domain.BlueprintModelContent blueprintModelContent) {
283 this.blueprintModelContent = blueprintModelContent;