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