2 * Copyright © 2019 IBM.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package org.onap.ccsdk.cds.blueprintsprocessor.db.primary.domain
19 import com.fasterxml.jackson.annotation.JsonFormat
20 import com.fasterxml.jackson.annotation.JsonTypeInfo
21 import com.fasterxml.jackson.annotation.JsonTypeName
22 import org.springframework.data.annotation.LastModifiedDate
23 import java.io.Serializable
25 import javax.persistence.Column
26 import javax.persistence.Entity
27 import javax.persistence.Id
28 import javax.persistence.Lob
29 import javax.persistence.Table
30 import javax.persistence.Temporal
31 import javax.persistence.TemporalType
34 * Provide Blueprint Model Search Entity
36 * @author Brinda Santh
41 @Table(name = "BLUEPRINT_MODEL")
42 @JsonTypeName("blueprintModel")
43 @JsonTypeInfo(include = JsonTypeInfo.As.WRAPPER_OBJECT, use = JsonTypeInfo.Id.NAME)
44 class BlueprintModelSearch : Serializable {
47 @Column(name = "blueprint_model_id")
48 var id: String? = null
50 @Column(name = "artifact_uuid")
51 var artifactUUId: String? = null
53 @Column(name = "artifact_type")
54 var artifactType: String? = null
56 @Column(name = "artifact_version", nullable = false)
57 var artifactVersion: String? = null
60 @Column(name = "artifact_description")
61 var artifactDescription: String? = null
63 @Column(name = "internal_version")
64 var internalVersion: Int? = null
66 @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
68 @Temporal(TemporalType.TIMESTAMP)
69 @Column(name = "creation_date")
70 var createdDate = Date()
72 @Column(name = "artifact_name", nullable = false)
73 var artifactName: String? = null
75 @Column(name = "published", nullable = false)
76 var published: String? = null
78 @Column(name = "updated_by", nullable = false)
79 var updatedBy: String? = null
82 @Column(name = "tags", nullable = false)
83 var tags: String? = null
87 const val serialversionuid = 1L