package org.taobao88.taobao.enterprise.entity; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table(name = "payment_methods") public class PaymentMethod implements Serializable { /** * */ private static final long serialVersionUID = -6114516010204738486L; @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "id") private int id; @Column(name = "method_name") private String methodName; @Column(name = "method_description") private String methodDescription; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getMethodName() { return methodName; } public void setMethodName(String methodName) { this.methodName = methodName; } public String getMethodDescription() { return methodDescription; } public void setMethodDescription(String methodDescription) { this.methodDescription = methodDescription; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + id; result = prime * result + ((methodDescription == null) ? 0 : methodDescription .hashCode()); result = prime * result + ((methodName == null) ? 0 : methodName.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; PaymentMethod other = (PaymentMethod) obj; if (id != other.id) return false; if (methodDescription == null) { if (other.methodDescription != null) return false; } else if (!methodDescription.equals(other.methodDescription)) return false; if (methodName == null) { if (other.methodName != null) return false; } else if (!methodName.equals(other.methodName)) return false; return true; } }