[PORTAL-16 PORTAL-18] Widget ms; staging
[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  * @author aw3218
35  */
36 @Entity 
37 @Table(name="fn_common_widget_data")
38 @JsonInclude(JsonInclude.Include.NON_NULL)
39 public class CommonWidget extends DomainVo{
40
41         private static final long serialVersionUID = 7897021982887364557L;
42         
43         @Id
44         @GeneratedValue(strategy=GenerationType.AUTO)
45         @Column(name = "id")
46         private Long id;
47
48         @Column(name = "category")
49         public String category;
50         
51         @Column(name = "href")
52         public String href;
53
54         @Column(name = "title")
55         public String title;
56         
57         @Column(name = "content")
58         public String content;
59
60         @Column(name = "event_date")
61         public String eventDate;
62         
63         @Column(name = "sort_order")
64         public Integer sortOrder;
65
66         
67         public CommonWidget(){
68                 
69         }
70         
71         public CommonWidget(String category, String href, String title, String content, String eventDate, Integer sortOrder){
72                 this.category = category;
73                 this.href = href;
74                 this.title = title;
75                 this.content = content;
76                 this.eventDate = eventDate;
77                 this.sortOrder = sortOrder;
78         }
79
80         public String getCategory() {
81                 return category;
82         }
83
84         public void setCategory(String category) {
85                 this.category = category;
86         }
87
88         public String getHref() {
89                 return href;
90         }
91
92         public void setHref(String href) {
93                 this.href = href;
94         }
95
96         public String getTitle() {
97                 return title;
98         }
99
100         public void setTitle(String title) {
101                 this.title = title;
102         }
103
104         public Integer getSortOrder() {
105                 return sortOrder;
106         }
107
108         public void setSortOrder(Integer sortOrder) {
109                 this.sortOrder = sortOrder;
110         }
111
112         public static long getSerialversionuid() {
113                 return serialVersionUID;
114         }
115
116         public Long getId() {
117                 return id;
118         }
119
120         public void setId(Long id) {            
121                 this.id = id;
122         }
123
124         public String getContent() {
125                 return content;
126         }
127
128         public void setContent(String content) {
129                 this.content = content;
130         }
131
132         public String getEventDate() {
133                 return eventDate;
134         }
135
136         public void setEventDate(String eventDate) {
137                 this.eventDate = eventDate;
138         }       
139 }