Subversion Repositories SmartDukaan

Rev

Rev 23405 | Rev 30003 | 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.catalog;

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

@Entity
@Table(name="catalog.category", schema = "catalog")
public class Category {
        @Id
        @Column(name="id", columnDefinition = "int(11)")
        private int id;
        
        @Column(name="label", length = 100)
        private String label;

        @Override
        public int hashCode() {
                final int prime = 31;
                int result = 1;
                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;
                Category other = (Category) obj;
                if (id != other.id)
                        return false;
                return true;
        }

        @Override
        public String toString() {
                return "Category [id=" + id + ", label=" + label + "]";
        }

        public String getLabel() {
                return label;
        }

        public void setLabel(String label) {
                this.label = label;
        }

        public int getId() {
                return id;
        }

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