2 * ============LICENSE_START=======================================================
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
23 package org.onap.aai.sparky.config.oxm;
25 import java.util.List;
27 import org.onap.aai.sparky.synchronizer.entity.SuggestionSearchEntity;
30 * The Class OxmEntityDescriptor.
32 public class OxmEntityDescriptor {
34 private String entityName;
36 private List<String> primaryKeyAttributeName;
38 private List<String> searchableAttributes;
40 private CrossEntityReference crossEntityReference;
42 private String geoLatName;
44 private String geoLongName;
46 private SuggestionSearchEntity suggestionSearchEntity;
48 public String getEntityName() {
52 public void setEntityName(String entityName) {
53 this.entityName = entityName;
56 public List<String> getPrimaryKeyAttributeName() {
57 return primaryKeyAttributeName;
60 public void setPrimaryKeyAttributeName(List<String> primaryKeyAttributeName) {
61 this.primaryKeyAttributeName = primaryKeyAttributeName;
64 public List<String> getSearchableAttributes() {
65 return searchableAttributes;
68 public void setSearchableAttributes(List<String> searchableAttributes) {
69 this.searchableAttributes = searchableAttributes;
73 * Checks for searchable attributes.
75 * @return true, if successful
77 public boolean hasSearchableAttributes() {
79 if (this.searchableAttributes == null) {
83 if (this.searchableAttributes.size() > 0) {
91 public CrossEntityReference getCrossEntityReference() {
92 return crossEntityReference;
95 public void setCrossEntityReference(CrossEntityReference crossEntityReference) {
96 this.crossEntityReference = crossEntityReference;
100 * Checks for cross entity references.
102 * @return true, if successful
104 public boolean hasCrossEntityReferences() {
105 if (this.crossEntityReference == null) {
108 if (!this.crossEntityReference.getReferenceAttributes().isEmpty()) {
114 public String getGeoLatName() {
118 public void setGeoLatName(String geoLatName) {
119 this.geoLatName = geoLatName;
122 public String getGeoLongName() {
126 public void setGeoLongName(String geoLongName) {
127 this.geoLongName = geoLongName;
131 * Checks for geo entity.
133 * @return true, if successful
135 public boolean hasGeoEntity() {
137 if (this.geoLongName != null && this.geoLatName != null) {
145 public SuggestionSearchEntity getSuggestionSearchEntity() {
146 return this.suggestionSearchEntity;
149 public void setSuggestionSearchEntity(SuggestionSearchEntity suggestionSearchEntity) {
150 this.suggestionSearchEntity = suggestionSearchEntity;
154 * Checks for non-null, populated SuggestionSearchEntity.
156 * @return true, if successful
158 public boolean hasSuggestionSearchEntity() {
159 if (this.suggestionSearchEntity == null) {
162 if (!this.suggestionSearchEntity.getSuggestionConnectorWords().isEmpty()) {
169 public String toString() {
170 return "OxmEntityDescriptor [entityName=" + entityName + ", primaryKeyAttributeName="
171 + primaryKeyAttributeName + ", searchableAttributes=" + searchableAttributes
172 + ", crossEntityReference=" + crossEntityReference + ", geoLatName=" + geoLatName
173 + ", geoLongName=" + geoLongName + ", suggestionSearchEntity=" + suggestionSearchEntity