![JAR search and dependency download from the Maven repository](/logo.png)
org.bonitasoft.web.designer.model.page.PropertyValue Maven / Gradle / Ivy
/**
* Copyright (C) 2015 BonitaSoft S.A.
* BonitaSoft, 32 rue Gustave Eiffel - 38000 Grenoble
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2.0 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
package org.bonitasoft.web.designer.model.page;
import static org.apache.commons.lang3.builder.ToStringStyle.SHORT_PREFIX_STYLE;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.bonitasoft.web.designer.model.JsonViewPersistence;
import com.fasterxml.jackson.annotation.JsonView;
public class PropertyValue {
private String type;
private Object value;
@JsonView({ JsonViewPersistence.class })
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
@JsonView({ JsonViewPersistence.class })
public Object getValue() {
return value;
}
public void setValue(Object value) {
this.value = value;
}
@Override
public boolean equals(final Object obj) {
if (obj instanceof PropertyValue) {
final PropertyValue other = (PropertyValue) obj;
return new EqualsBuilder()
.append(type, other.type)
.append(value, other.value)
.isEquals();
} else {
return false;
}
}
@Override
public int hashCode() {
return new HashCodeBuilder(17, 37)
.append(type)
.append(value)
.toHashCode();
}
@Override
public String toString() {
return new ToStringBuilder(this, SHORT_PREFIX_STYLE)
.append("type", type)
.append("value", value)
.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy