2 * ================================================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ================================================================================
20 package org.openecomp.portalsdk.analytics.system.fusion.adapter;
22 import javax.persistence.Column;
23 import javax.persistence.Entity;
24 import javax.persistence.GeneratedValue;
25 import javax.persistence.Id;
27 import org.openecomp.portalsdk.core.domain.support.DomainVo;
31 * <p>Represents a id/name data object.</p>
34 public class IdName extends DomainVo {
43 @Column(name = "ID", unique = true, nullable = false)
48 public void setId(Long id) {
52 public String getName() {
56 public void setName(String name) {
60 public int compareTo(Object obj){
61 String c1 = getName();
62 String c2 = ((IdName)obj).getName();
64 return (c1 == null || c2 == null) ? 1 : c1.compareTo(c2);