Initial ONAP Synapse commit
[aai/data-router.git] / src / main / java / org / openecomp / datarouter / entity / OxmEntityDescriptor.java
1 /**
2  * ============LICENSE_START=======================================================
3  * DataRouter
4  * ================================================================================
5  * Copyright © 2017 AT&T Intellectual Property.
6  * Copyright © 2017 Amdocs
7  * All rights reserved.
8  * ================================================================================
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *    http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  * ============LICENSE_END=========================================================
21  *
22  * ECOMP and OpenECOMP are trademarks
23  * and service marks of AT&T Intellectual Property.
24  */
25 package org.openecomp.datarouter.entity;
26
27 import java.util.List;
28
29 import org.openecomp.datarouter.util.CrossEntityReference;
30
31
32 public class OxmEntityDescriptor {
33         
34         private String entityName;
35
36         private List<String> primaryKeyAttributeName;
37         
38         private List<String> searchableAttributes;
39         
40         private CrossEntityReference crossEntityReference;
41         
42         private List<String> alias;
43         
44         private List<String> suggestableAttributes;
45     
46     boolean isSuggestableEntity;
47
48         public String getEntityName() {
49                 return entityName;
50         }
51
52         public void setEntityName(String entityName) {
53                 this.entityName = entityName;
54         }
55         
56         public List<String> getPrimaryKeyAttributeName() {
57                 return primaryKeyAttributeName;
58         }
59
60         public void setPrimaryKeyAttributeName(List<String> primaryKeyAttributeName) {
61                 this.primaryKeyAttributeName = primaryKeyAttributeName;
62         }
63
64         public List<String> getSearchableAttributes() {
65                 return searchableAttributes;
66         }
67
68         public void setSearchableAttributes(List<String> searchableAttributes) {
69                 this.searchableAttributes = searchableAttributes;
70         }
71         
72         public boolean hasSearchableAttributes() {
73            
74            if ( this.searchableAttributes == null) {
75               return false;
76            }
77            
78            if ( this.searchableAttributes.size() > 0 ) {
79               return true;
80            }
81            
82            return false;
83            
84         }
85
86         public CrossEntityReference getCrossEntityReference() {
87                 return crossEntityReference;
88         }
89
90         public void setCrossEntityReference(CrossEntityReference crossEntityReference) {
91                 this.crossEntityReference = crossEntityReference;
92         }
93
94         public List<String> getAlias() {
95     return alias;
96   }
97
98   public void setAlias(List<String> alias) {
99     this.alias = alias;
100   }
101
102   public List<String> getSuggestableAttributes() {
103     return suggestableAttributes;
104   }
105
106   public void setSuggestableAttributes(List<String> suggestableAttributes) {
107     this.suggestableAttributes = suggestableAttributes;
108   }
109
110   public boolean isSuggestableEntity() {
111     return isSuggestableEntity;
112   }
113
114   public void setSuggestableEntity(boolean isSuggestableEntity) {
115     this.isSuggestableEntity = isSuggestableEntity;
116   }
117
118   @Override
119   public String toString() {
120     return "OxmEntityDescriptor [entityName=" + entityName + ", primaryKeyAttributeName="
121         + primaryKeyAttributeName + ", searchableAttributes=" + searchableAttributes
122         + ", crossEntityReference=" + crossEntityReference + ", alias=" + alias
123         + ", suggestableAttributes=" + suggestableAttributes + ", isSuggestableEntity="
124         + isSuggestableEntity + "]";
125   }
126 }