org.bonitasoft.engine.identity.model.impl.SNamedElementImpl Maven / Gradle / Ivy
/**
* Copyright (C) 2015 BonitaSoft S.A.
* BonitaSoft, 32 rue Gustave Eiffel - 38000 Grenoble
* This library is free software; you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Foundation
* version 2.1 of the License.
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public License along with this
* program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
**/
package org.bonitasoft.engine.identity.model.impl;
import org.bonitasoft.engine.identity.model.SNamedElement;
/**
* All elements that have name label and description
*
* @author Baptiste Mesta
* @author Matthieu Chaffotte
*/
public abstract class SNamedElementImpl extends SSingleNamedElementImpl implements SNamedElement {
private static final long serialVersionUID = 4982939032656177720L;
private String displayName;
public SNamedElementImpl() {
super();
}
@Override
public String getDisplayName() {
return this.displayName;
}
public void setDisplayName(final String displayName) {
this.displayName = displayName;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
if (!super.equals(o)) {
return false;
}
SNamedElementImpl that = (SNamedElementImpl) o;
return !(displayName != null ? !displayName.equals(that.displayName) : that.displayName != null);
}
@Override
public int hashCode() {
int result = super.hashCode();
result = 31 * result + (displayName != null ? displayName.hashCode() : 0);
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy