Subversion Repositories SmartDukaan

Rev

Rev 24383 | Rev 27124 | Go to most recent revision | View as "text/plain" | 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 amit
 *
 */

@Entity
@Table(name="cs.ticket_sub_category", schema = "cs")
public class TicketSubCategory 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="category_id")
        private int categoryId;
        
        @Override
        public int hashCode() {
                final int prime = 31;
                int result = 1;
                result = prime * result + categoryId;
                result = prime * result + ((description == null) ? 0 : description.hashCode());
                result = prime * result + id;
                result = prime * result + ((name == null) ? 0 : name.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;
                TicketSubCategory other = (TicketSubCategory) obj;
                if (categoryId != other.categoryId)
                        return false;
                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;
        }

        public int getId() {
                return id;
        }

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

        public int getcategoryId() {
                return categoryId;
        }

        public void setcategoryId(int categoryId) {
                this.categoryId = categoryId;
        }

        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;
        }

        @Override
        public String toString() {
                return "TicketSubCategory [id=" + id + ", categoryId=" + categoryId + ", name=" + name + ", description="
                                + description + "]";
        }

        @Column(name="name", unique = true)
        private String name;
        
        @Column(name = "description")
        private String description;
        
}