a0bbd90e441ad1827f59313ef2d1357d29388a41
[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.
30  * A drop-down list, for example, may be populated with the values from several instances of this class.
31  */
32 @JsonInclude(Include.NON_NULL)
33 public class UiFilterValueEntity {
34   private String filterId;
35   private String filterValue;
36   private String displayName; // The string that will be rendered in the view
37
38   public UiFilterValueEntity() {}
39
40   public UiFilterValueEntity(String filterId, String filterValue, String displayName) {
41     this.filterId = filterId;
42     this.filterValue = filterValue;
43     this.displayName = displayName;
44   }
45
46   public String getFilterId() {
47     return filterId;
48   }
49
50   public String getFilterValue() {
51     return filterValue;
52   }
53
54   public String getDisplayName() {
55     return displayName;
56   }
57
58   public void setFilterId(String filterId) {
59     this.filterId = filterId;
60   }
61
62   public void setFilterValue(String filterValue) {
63     this.filterValue = filterValue;
64   }
65
66   public void setDisplayName(String displayName) {
67     this.displayName = displayName;
68   }
69
70   @Override
71   public String toString() {
72     return "UiFilterValueEntity [" + (filterId != null ? "filterId=" + filterId + ", " : "")
73         + (filterValue != null ? "filterValue=" + filterValue + ", " : "")
74         + (displayName != null ? "displayName=" + displayName : "") + "]";
75   }
76   
77   
78 }