Migrate ccsdk/apps to ccsdk/cds
[ccsdk/cds.git] / ms / controllerblueprints / modules / service / src / main / java / org / onap / ccsdk / cds / controllerblueprints / service / domain / BlueprintModelContent.java
-/*\r
- * Copyright © 2017-2018 AT&T Intellectual Property.\r
- * Modifications Copyright © 2019 Bell Canada.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.onap.ccsdk.apps.controllerblueprints.service.domain;\r
-\r
-import com.fasterxml.jackson.annotation.JsonFormat;\r
-import io.swagger.annotations.ApiModelProperty;\r
-import org.springframework.data.annotation.LastModifiedDate;\r
-import org.springframework.data.jpa.domain.support.AuditingEntityListener;\r
-\r
-import javax.persistence.*;\r
-import java.io.Serializable;\r
-import java.util.Date;\r
-import java.util.Objects;\r
-\r
-/**\r
- * DataDictionary.java Purpose: Provide Configuration Generator DataDictionary Entity\r
- *\r
- * @author Brinda Santh\r
- * @version 1.0\r
- */\r
-@EntityListeners({AuditingEntityListener.class})\r
-@Entity\r
-@Table(name = "CONFIG_MODEL_CONTENT")\r
-public class BlueprintModelContent implements Serializable {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    @Id\r
-    @Column(name = "config_model_content_id")\r
-    private String id;\r
-\r
-    @Column(name = "name", nullable = false)\r
-    @ApiModelProperty(required=true)\r
-    private String name;\r
-\r
-    @Column(name = "content_type", nullable = false)\r
-    @ApiModelProperty(required=true)\r
-    private String contentType;\r
-\r
-    @OneToOne\r
-    @JoinColumn(name = "config_model_id")\r
-    private BlueprintModel blueprintModel;\r
-\r
-    @Lob\r
-    @Column(name = "description")\r
-    private String description;\r
-\r
-    @Lob\r
-    @Column(name = "content", nullable = false)\r
-    @ApiModelProperty(required=true)\r
-    private byte[]  content;\r
-\r
-    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")\r
-    @LastModifiedDate\r
-    @Temporal(TemporalType.TIMESTAMP)\r
-    @Column(name = "updated_date")\r
-    private Date creationDate = new Date();\r
-\r
-    @Override\r
-    public String toString() {\r
-        return "[" + "id = " + id +\r
-                ", name = " + name +\r
-                ", contentType = " + contentType +\r
-                "]";\r
-    }\r
-\r
-    @Override\r
-    public boolean equals(Object o) {\r
-\r
-        if (o == this) {\r
-            return true;\r
-        }\r
-        if (!(o instanceof BlueprintModelContent)) {\r
-            return false;\r
-        }\r
-        BlueprintModelContent blueprintModelContent = (BlueprintModelContent) o;\r
-        return Objects.equals(id, blueprintModelContent.id) && Objects.equals(name, blueprintModelContent.name)\r
-                && Objects.equals(contentType, blueprintModelContent.contentType);\r
-    }\r
-\r
-    @Override\r
-    public int hashCode() {\r
-        return Objects.hash(id, name, contentType);\r
-    }\r
-\r
-    public String getId() {\r
-        return id;\r
-    }\r
-\r
-\r
-    public void setId(String id) {\r
-        this.id = id;\r
-    }\r
-\r
-\r
-    public String getName() {\r
-        return name;\r
-    }\r
-\r
-\r
-    public void setName(String name) {\r
-        this.name = name;\r
-    }\r
-\r
-\r
-    public String getContentType() {\r
-        return contentType;\r
-    }\r
-\r
-\r
-    public void setContentType(String contentType) {\r
-        this.contentType = contentType;\r
-    }\r
-\r
-\r
-    public BlueprintModel getBlueprintModel() {\r
-        return blueprintModel;\r
-    }\r
-\r
-\r
-    public void setBlueprintModel(BlueprintModel blueprintModel) {\r
-        this.blueprintModel = blueprintModel;\r
-    }\r
-\r
-\r
-    public String getDescription() {\r
-        return description;\r
-    }\r
-\r
-\r
-    public void setDescription(String description) {\r
-        this.description = description;\r
-    }\r
-\r
-\r
-    public byte[] getContent() {\r
-        return content;\r
-    }\r
-\r
-\r
-    public void setContent(byte[] content) {\r
-        this.content = content;\r
-    }\r
-\r
-\r
-    public Date getCreationDate() {\r
-        return creationDate;\r
-    }\r
-\r
-\r
-    public void setCreationDate(Date creationDate) {\r
-        this.creationDate = creationDate;\r
-    }\r
-\r
-}\r
+/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2019 Bell Canada.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.ccsdk.cds.controllerblueprints.service.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import org.springframework.data.annotation.LastModifiedDate;
+import org.springframework.data.jpa.domain.support.AuditingEntityListener;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.util.Date;
+import java.util.Objects;
+
+/**
+ * DataDictionary.java Purpose: Provide Configuration Generator DataDictionary Entity
+ *
+ * @author Brinda Santh
+ * @version 1.0
+ */
+@EntityListeners({AuditingEntityListener.class})
+@Entity
+@Table(name = "CONFIG_MODEL_CONTENT")
+public class BlueprintModelContent implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @Id
+    @Column(name = "config_model_content_id")
+    private String id;
+
+    @Column(name = "name", nullable = false)
+    @ApiModelProperty(required=true)
+    private String name;
+
+    @Column(name = "content_type", nullable = false)
+    @ApiModelProperty(required=true)
+    private String contentType;
+
+    @OneToOne
+    @JoinColumn(name = "config_model_id")
+    private BlueprintModel blueprintModel;
+
+    @Lob
+    @Column(name = "description")
+    private String description;
+
+    @Lob
+    @Column(name = "content", nullable = false)
+    @ApiModelProperty(required=true)
+    private byte[]  content;
+
+    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
+    @LastModifiedDate
+    @Temporal(TemporalType.TIMESTAMP)
+    @Column(name = "updated_date")
+    private Date creationDate = new Date();
+
+    @Override
+    public String toString() {
+        return "[" + "id = " + id +
+                ", name = " + name +
+                ", contentType = " + contentType +
+                "]";
+    }
+
+    @Override
+    public boolean equals(Object o) {
+
+        if (o == this) {
+            return true;
+        }
+        if (!(o instanceof BlueprintModelContent)) {
+            return false;
+        }
+        BlueprintModelContent blueprintModelContent = (BlueprintModelContent) o;
+        return Objects.equals(id, blueprintModelContent.id) && Objects.equals(name, blueprintModelContent.name)
+                && Objects.equals(contentType, blueprintModelContent.contentType);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(id, name, contentType);
+    }
+
+    public String getId() {
+        return id;
+    }
+
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+
+    public String getName() {
+        return name;
+    }
+
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+
+    public String getContentType() {
+        return contentType;
+    }
+
+
+    public void setContentType(String contentType) {
+        this.contentType = contentType;
+    }
+
+
+    public BlueprintModel getBlueprintModel() {
+        return blueprintModel;
+    }
+
+
+    public void setBlueprintModel(BlueprintModel blueprintModel) {
+        this.blueprintModel = blueprintModel;
+    }
+
+
+    public String getDescription() {
+        return description;
+    }
+
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+
+    public byte[] getContent() {
+        return content;
+    }
+
+
+    public void setContent(byte[] content) {
+        this.content = content;
+    }
+
+
+    public Date getCreationDate() {
+        return creationDate;
+    }
+
+
+    public void setCreationDate(Date creationDate) {
+        this.creationDate = creationDate;
+    }
+
+}