5be1fb702e15f87f6843f9806739dc2236696347
[portal.git] / ecomp-portal-BE-common / src / main / java / org / openecomp / portalapp / portal / transport / CommonWidget.java
1 /*-
2  * ================================================================================
3  * ECOMP Portal
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ================================================================================
19  */
20 package org.openecomp.portalapp.portal.transport;
21
22 import javax.persistence.Column;
23 import javax.persistence.Entity;
24 import javax.persistence.GeneratedValue;
25 import javax.persistence.GenerationType;
26 import javax.persistence.Id;
27 import javax.persistence.Table;
28
29 import org.openecomp.portalsdk.core.domain.support.DomainVo;
30 import com.fasterxml.jackson.annotation.JsonInclude;
31
32 /**
33  * This is to handle portal admins
34  */
35 @Entity 
36 @Table(name="fn_common_widget_data")
37 @JsonInclude(JsonInclude.Include.NON_NULL)
38 public class CommonWidget extends DomainVo{
39
40         private static final long serialVersionUID = 7897021982887364557L;
41         
42         @Id
43         @GeneratedValue(strategy=GenerationType.AUTO)
44         @Column(name = "id")
45         private Long id;
46
47         @Column(name = "category")
48         public String category;
49         
50         @Column(name = "href")
51         public String href;
52
53         @Column(name = "title")
54         public String title;
55         
56         @Column(name = "content")
57         public String content;
58
59         @Column(name = "event_date")
60         public String eventDate;
61         
62         @Column(name = "sort_order")
63         public Integer sortOrder;
64
65         
66         public CommonWidget(){
67                 
68         }
69         
70         public CommonWidget(String category, String href, String title, String content, String eventDate, Integer sortOrder){
71                 this.category = category;
72                 this.href = href;
73                 this.title = title;
74                 this.content = content;
75                 this.eventDate = eventDate;
76                 this.sortOrder = sortOrder;
77         }
78
79         public String getCategory() {
80                 return category;
81         }
82
83         public void setCategory(String category) {
84                 this.category = category;
85         }
86
87         public String getHref() {
88                 return href;
89         }
90
91         public void setHref(String href) {
92                 this.href = href;
93         }
94
95         public String getTitle() {
96                 return title;
97         }
98
99         public void setTitle(String title) {
100                 this.title = title;
101         }
102
103         public Integer getSortOrder() {
104                 return sortOrder;
105         }
106
107         public void setSortOrder(Integer sortOrder) {
108                 this.sortOrder = sortOrder;
109         }
110
111         public static long getSerialversionuid() {
112                 return serialVersionUID;
113         }
114
115         public Long getId() {
116                 return id;
117         }
118
119         public void setId(Long id) {            
120                 this.id = id;
121         }
122
123         public String getContent() {
124                 return content;
125         }
126
127         public void setContent(String content) {
128                 this.content = content;
129         }
130
131         public String getEventDate() {
132                 return eventDate;
133         }
134
135         public void setEventDate(String eventDate) {
136                 this.eventDate = eventDate;
137         }       
138 }