Rev 31170 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.spice.profitmandi.dao.entity.cs;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;/*** This class basically contains api details** @author Govind**/@Entity@Table(name="cs.region", schema = "cs")public class Region implements Serializable{private static final long serialVersionUID = 1L;@Id@Column(name="id", unique=true, updatable=false)@GeneratedValue(strategy = GenerationType.IDENTITY)private int id;@Column(name="name", unique = true)private String name;@Column(name = "description")private String description;@Overridepublic String toString() {return "Region [id=" + id + ", name=" + name + ", description=" + description + "]";}public int getId() {return id;}public void setId(int id) {this.id = id;}public String getName() {return name;}public void setName(String name) {this.name = name;}public String getDescription() {return description;}public void setDescription(String description) {this.description = description;}@Overridepublic int hashCode() {final int prime = 31;int result = 1;result = prime * result + ((description == null) ? 0 : description.hashCode());result = prime * result + id;result = prime * result + ((name == null) ? 0 : name.hashCode());return result;}@Overridepublic boolean equals(Object obj) {if (this == obj)return true;if (obj == null)return false;if (getClass() != obj.getClass())return false;Region other = (Region) obj;if (description == null) {if (other.description != null)return false;} else if (!description.equals(other.description))return false;if (id != other.id)return false;if (name == null) {if (other.name != null)return false;} else if (!name.equals(other.name))return false;return true;}}