Merge "Fix file stream closing"
[aai/data-router.git] / src / main / java / org / onap / aai / datarouter / entity / OxmEntityDescriptor.java
1 /**
2  * ============LICENSE_START=======================================================
3  * org.onap.aai
4  * ================================================================================
5  * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
6  * Copyright © 2017-2018 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 package org.onap.aai.datarouter.entity;
22
23 import java.util.List;
24
25 import org.onap.aai.datarouter.util.CrossEntityReference;
26
27
28 public class OxmEntityDescriptor {
29         
30         private String entityName;
31
32         private List<String> primaryKeyAttributeName;
33         
34         private List<String> searchableAttributes;
35         
36         private CrossEntityReference crossEntityReference;
37         
38         private List<String> alias;
39         
40         private List<String> suggestableAttributes;
41     
42     boolean isSuggestableEntity;
43
44         public String getEntityName() {
45                 return entityName;
46         }
47
48         public void setEntityName(String entityName) {
49                 this.entityName = entityName;
50         }
51         
52         public List<String> getPrimaryKeyAttributeName() {
53                 return primaryKeyAttributeName;
54         }
55
56         public void setPrimaryKeyAttributeName(List<String> primaryKeyAttributeName) {
57                 this.primaryKeyAttributeName = primaryKeyAttributeName;
58         }
59
60         public List<String> getSearchableAttributes() {
61                 return searchableAttributes;
62         }
63
64         public void setSearchableAttributes(List<String> searchableAttributes) {
65                 this.searchableAttributes = searchableAttributes;
66         }
67         
68         public boolean hasSearchableAttributes() {
69            
70            if ( this.searchableAttributes == null) {
71               return false;
72            }
73            
74            if ( !this.searchableAttributes.isEmpty() ) {
75               return true;
76            }
77            
78            return false;
79            
80         }
81
82         public CrossEntityReference getCrossEntityReference() {
83                 return crossEntityReference;
84         }
85
86         public void setCrossEntityReference(CrossEntityReference crossEntityReference) {
87                 this.crossEntityReference = crossEntityReference;
88         }
89
90         public List<String> getAlias() {
91     return alias;
92   }
93
94   public void setAlias(List<String> alias) {
95     this.alias = alias;
96   }
97
98   public List<String> getSuggestableAttributes() {
99     return suggestableAttributes;
100   }
101
102   public void setSuggestableAttributes(List<String> suggestableAttributes) {
103     this.suggestableAttributes = suggestableAttributes;
104   }
105
106   public boolean isSuggestableEntity() {
107     return isSuggestableEntity;
108   }
109
110   public void setSuggestableEntity(boolean isSuggestableEntity) {
111     this.isSuggestableEntity = isSuggestableEntity;
112   }
113
114   @Override
115   public String toString() {
116     return "OxmEntityDescriptor [entityName=" + entityName + ", primaryKeyAttributeName="
117         + primaryKeyAttributeName + ", searchableAttributes=" + searchableAttributes
118         + ", crossEntityReference=" + crossEntityReference + ", alias=" + alias
119         + ", suggestableAttributes=" + suggestableAttributes + ", isSuggestableEntity="
120         + isSuggestableEntity + "]";
121   }
122 }