ed8b9fdfcebe27bd550a955d9369cb9a7b534b85
[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 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.datarouter.entity;
24
25 import java.util.List;
26
27 import org.openecomp.datarouter.util.CrossEntityReference;
28
29
30 public class OxmEntityDescriptor {
31         
32         private String entityName;
33
34         private List<String> primaryKeyAttributeName;
35         
36         private List<String> searchableAttributes;
37         
38         private CrossEntityReference crossEntityReference;
39         
40         private List<String> alias;
41         
42         private List<String> suggestableAttributes;
43     
44     boolean isSuggestableEntity;
45
46         public String getEntityName() {
47                 return entityName;
48         }
49
50         public void setEntityName(String entityName) {
51                 this.entityName = entityName;
52         }
53         
54         public List<String> getPrimaryKeyAttributeName() {
55                 return primaryKeyAttributeName;
56         }
57
58         public void setPrimaryKeyAttributeName(List<String> primaryKeyAttributeName) {
59                 this.primaryKeyAttributeName = primaryKeyAttributeName;
60         }
61
62         public List<String> getSearchableAttributes() {
63                 return searchableAttributes;
64         }
65
66         public void setSearchableAttributes(List<String> searchableAttributes) {
67                 this.searchableAttributes = searchableAttributes;
68         }
69         
70         public boolean hasSearchableAttributes() {
71            
72            if ( this.searchableAttributes == null) {
73               return false;
74            }
75            
76            if ( this.searchableAttributes.size() > 0 ) {
77               return true;
78            }
79            
80            return false;
81            
82         }
83
84         public CrossEntityReference getCrossEntityReference() {
85                 return crossEntityReference;
86         }
87
88         public void setCrossEntityReference(CrossEntityReference crossEntityReference) {
89                 this.crossEntityReference = crossEntityReference;
90         }
91
92         public List<String> getAlias() {
93     return alias;
94   }
95
96   public void setAlias(List<String> alias) {
97     this.alias = alias;
98   }
99
100   public List<String> getSuggestableAttributes() {
101     return suggestableAttributes;
102   }
103
104   public void setSuggestableAttributes(List<String> suggestableAttributes) {
105     this.suggestableAttributes = suggestableAttributes;
106   }
107
108   public boolean isSuggestableEntity() {
109     return isSuggestableEntity;
110   }
111
112   public void setSuggestableEntity(boolean isSuggestableEntity) {
113     this.isSuggestableEntity = isSuggestableEntity;
114   }
115
116   @Override
117   public String toString() {
118     return "OxmEntityDescriptor [entityName=" + entityName + ", primaryKeyAttributeName="
119         + primaryKeyAttributeName + ", searchableAttributes=" + searchableAttributes
120         + ", crossEntityReference=" + crossEntityReference + ", alias=" + alias
121         + ", suggestableAttributes=" + suggestableAttributes + ", isSuggestableEntity="
122         + isSuggestableEntity + "]";
123   }
124 }