Adding back-end support for UI filters
[aai/sparky-be.git] / src / main / java / org / onap / aai / sparky / search / filters / entity / UiFilterValueEntity.java
1 /**
2  * ============LICENSE_START=======================================================
3  * org.onap.aai
4  * ================================================================================
5  * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6  * Copyright © 2017 Amdocs
7  * ================================================================================
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  *       http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  * ============LICENSE_END=========================================================
20  *
21  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
22  */
23 package org.onap.aai.sparky.search.filters.entity;
24
25 import com.fasterxml.jackson.annotation.JsonInclude;
26 import com.fasterxml.jackson.annotation.JsonInclude.Include;
27
28 /**
29  * This class represents a single item or value to populate the FE filter component with. A
30  * drop-down list, for example, may be populated with the values from several instances of this
31  * class.
32  */
33 @JsonInclude(Include.NON_NULL)
34 public class UiFilterValueEntity {
35   private String filterId;
36   private String filterValue;
37   private String displayName; // The string that will be rendered in the view
38
39   public UiFilterValueEntity() {}
40
41   public UiFilterValueEntity(String filterId, String filterValue, String displayName) {
42     this.filterId = filterId;
43     this.filterValue = filterValue;
44     this.displayName = displayName;
45   }
46
47   public String getFilterId() {
48     return filterId;
49   }
50
51   public String getFilterValue() {
52     return filterValue;
53   }
54
55   public String getDisplayName() {
56     return displayName;
57   }
58
59   public void setFilterId(String filterId) {
60     this.filterId = filterId;
61   }
62
63   public void setFilterValue(String filterValue) {
64     this.filterValue = filterValue;
65   }
66
67   public void setDisplayName(String displayName) {
68     this.displayName = displayName;
69   }
70
71   @Override
72   public String toString() {
73     return "UiFilterValueEntity [" + (filterId != null ? "filterId=" + filterId + ", " : "")
74         + (filterValue != null ? "filterValue=" + filterValue + ", " : "")
75         + (displayName != null ? "displayName=" + displayName : "") + "]";
76   }
77
78
79 }