All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bigcommerce.catalog.models.CustomField Maven / Gradle / Ivy

There is a newer version: 2.0.1
Show newest version
package com.bigcommerce.catalog.models;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;

@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@JsonInclude(Include.NON_NULL)
public class CustomField {

	private String name;
	private String value;
	private String id;

	public String getName() {
		return name;
	}

	public void setName(final String name) {
		this.name = name;
	}

	public String getValue() {
		return value;
	}

	public void setValue(final String value) {
		this.value = value;
	}

	public String getId() {
		return id;
	}

	public void setId(final String id) {
		this.id = id;
	}

	@Override
	public int hashCode() {
		return new HashCodeBuilder().append(getName()).append(getValue()).toHashCode();
	}

	@Override
	public boolean equals(final Object object) {
		if (object == this) {
			return true;
		}
		if (!(object instanceof Variant)) {
			return false;
		}
		final CustomField customField = (CustomField) object;
		return new EqualsBuilder().append(getName(), customField.getName()).append(getValue(), customField.getValue())
				.isEquals();
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy