Subversion Repositories SmartDukaan

Rev

Rev 24417 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

/**
 * 
 */
package com.spice.profitmandi.dao.entity.cs;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import com.spice.profitmandi.dao.enumuration.cs.EscalationType;

/**
 * @author govind
 *
 */
@Entity
@Table(name="cs.position" ,schema="cs")
public class Position {
        
        @Id
        @Column(name="id", unique=true, updatable=false)
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        private int id;
        
        @Column(name="auth_user_id")
        private int authUserId;
        
        @Column(name="category_id")
        private int categoryId;
        
        @Column(name="escalation_type")
        @Enumerated(EnumType.STRING)
        private EscalationType escalationType;

        public int getId() {
                return id;
        }

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

        public int getAuthUserId() {
                return authUserId;
        }

        public void setAuthUserId(int authUserId) {
                this.authUserId = authUserId;
        }

        public int getCategoryId() {
                return categoryId;
        }

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

        public EscalationType getEscalationType() {
                return escalationType;
        }

        public void setEscalationType(EscalationType escalationType) {
                this.escalationType = escalationType;
        }

        @Override
        public int hashCode() {
                final int prime = 31;
                int result = 1;
                result = prime * result + authUserId;
                result = prime * result + categoryId;
                result = prime * result + ((escalationType == null) ? 0 : escalationType.hashCode());
                result = prime * result + id;
                return result;
        }

        @Override
        public boolean equals(Object obj) {
                if (this == obj)
                        return true;
                if (obj == null)
                        return false;
                if (getClass() != obj.getClass())
                        return false;
                Position other = (Position) obj;
                if (authUserId != other.authUserId)
                        return false;
                if (categoryId != other.categoryId)
                        return false;
                if (escalationType != other.escalationType)
                        return false;
                if (id != other.id)
                        return false;
                return true;
        }

        @Override
        public String toString() {
                return "Position [id=" + id + ", authUserId=" + authUserId + ", categoryId=" + categoryId + ", escalationType="
                                + escalationType + "]";
        }
        
        

}