Subversion Repositories SmartDukaan

Rev

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.auth;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

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

@Entity
@Table(name="auth.menu_category", schema = "auth")
public class MenuCategory implements Serializable {
        public EscalationType getEscalationType() {
                return escalationType;
        }

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

        private static final long serialVersionUID = 1L;

        @Id
        @Column(name = "menu_id")
        private int menuId;

        @Id
        @Column(name = "category_id")
        private int categoryId;
        
        public int getCategoryId() {
                return categoryId;
        }

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

        @Id
        @Column(name = "escalation_type")
        EscalationType escalationType;

        @Override
        public String toString() {
                return "MenuCategory [menuId=" + menuId + ", categoryId=" + categoryId + ", escalationType=" + escalationType
                                + "]";
        }

        public int getMenuId() {
                return menuId;
        }

        public void setMenuId(int menuId) {
                this.menuId = menuId;
        }

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

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