TermsAndConditionsConfig.java
package com.tradecloud.domain.export;
import com.tradecloud.common.base.PersistenceBase;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.springframework.stereotype.Component;
import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
/**
* Created by ds on 2016/08/23.
*/
@Entity
@Component(value = "TermsAndConditionsConfig")
@Table(name = "termsandconditionsconfig")
@Access(AccessType.FIELD)
public class TermsAndConditionsConfig extends PersistenceBase {
@NotNull
private String header;
@NotNull
private String description;
private boolean defaultTermAndCondition;
public String getHeader() {
return header;
}
public void setHeader(String header) {
this.header = header;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public boolean isDefaultTermAndCondition() {
return defaultTermAndCondition;
}
public void setDefaultTermAndCondition(boolean defaultTermAndCondition) {
this.defaultTermAndCondition = defaultTermAndCondition;
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(description).append(header).toHashCode();
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof TermsAndConditionsConfig)) {
return false;
}
TermsAndConditionsConfig other = (TermsAndConditionsConfig) obj;
return new EqualsBuilder().append(description, other.description).append(header, other.header)
.isEquals();
}
}