2 * ============LICENSE_START==========================================
4 * ===================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ===================================================================
8 * Unless otherwise specified, all software contained herein is licensed
9 * under the Apache License, Version 2.0 (the "License");
10 * you may not use this software except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
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.
21 * Unless otherwise specified, all documentation contained herein is licensed
22 * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
23 * you may not use this documentation except in compliance with the License.
24 * You may obtain a copy of the License at
26 * https://creativecommons.org/licenses/by/4.0/
28 * Unless required by applicable law or agreed to in writing, documentation
29 * distributed under the License is distributed on an "AS IS" BASIS,
30 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31 * See the License for the specific language governing permissions and
32 * limitations under the License.
34 * ============LICENSE_END============================================
38 package org.onap.portalapp.portal.transport;
40 import java.io.Serializable;
41 import java.util.Date;
44 @SuppressWarnings("rawtypes")
45 public class CentralRoleFunction implements Serializable, Comparable {
46 private static final long serialVersionUID = 1990254299529285610L;
49 private Date modified;
50 private Long createdId;
51 private Long modifiedId;
52 private Serializable auditUserId;
53 private Set auditTrail;
57 private String editUrl;
59 public CentralRoleFunction(String code, String name) {
65 public CentralRoleFunction() {
79 public void setId(Long id) {
86 public Date getCreated() {
94 public void setCreated(Date created) {
95 this.created = created;
99 * @return the modified
101 public Date getModified() {
107 * the modified to set
109 public void setModified(Date modified) {
110 this.modified = modified;
114 * @return the createdId
116 public Long getCreatedId() {
122 * the createdId to set
124 public void setCreatedId(Long createdId) {
125 this.createdId = createdId;
129 * @return the modifiedId
131 public Long getModifiedId() {
137 * the modifiedId to set
139 public void setModifiedId(Long modifiedId) {
140 this.modifiedId = modifiedId;
146 public Long getRowNum() {
154 public void setRowNum(Long rowNum) {
155 this.rowNum = rowNum;
161 public String getCode() {
169 public void setCode(String code) {
176 public String getName() {
184 public void setName(String name) {
188 public Serializable getAuditUserId() {
192 public void setAuditUserId(Serializable auditUserId) {
193 this.auditUserId = auditUserId;
196 public Set getAuditTrail() {
200 public void setAuditTrail(Set auditTrail) {
201 this.auditTrail = auditTrail;
204 public String getEditUrl() {
208 public void setEditUrl(String editUrl) {
209 this.editUrl = editUrl;
213 public int compareTo(Object obj) {
214 String c1 = getName();
215 String c2 = ((CentralRoleFunction) obj).getName();
217 return (c1 == null || c2 == null) ? 1 : c1.compareTo(c2);
221 public int hashCode() {
222 final int prime = 31;
224 result = prime * result + ((code == null) ? 0 : code.hashCode());
225 result = prime * result + ((name == null) ? 0 : name.hashCode());
230 public boolean equals(Object obj) {
235 if (getClass() != obj.getClass())
237 CentralRoleFunction other = (CentralRoleFunction) obj;
239 if (other.code != null)
241 } else if (!code.equals(other.code))
244 if (other.name != null)
246 } else if (!name.equals(other.name))