Subversion Repositories SmartDukaan

Rev

Rev 30003 | Rev 34814 | 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 java.util.List;

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

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

        @Column(name = "label", length = 100)
        private String label;

        @Column(name = "description")
        private String description;

        @Column(name = "parent_category_id")
        private long parentCategoryId;

        @Column(name = "display_name")
        private String displayName;

        public String getDescription() {
                return description;
        }

        public void setDescription(String description) {
                this.description = description;
        }

        public long getParentCategoryId() {
                return parentCategoryId;
        }

        public void setParentCategoryId(long parentCategoryId) {
                this.parentCategoryId = parentCategoryId;
        }

        public String getDisplayName() {
                return displayName;
        }

        public void setDisplayName(String displayName) {
                this.displayName = displayName;
        }

        @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 + ", description=" + description + ", parentCategoryId="
                                + parentCategoryId + ", displayName=" + displayName + "]";
        }

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

}