Subversion Repositories SmartDukaan

Rev

Rev 31507 | 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.Objects;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@Table(name = "catalog.brand")
public class BrandCatalog {

        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        @Column(name = "id", columnDefinition = "int(11)")
        private int id;

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

        @Column(name = "logo_url")
        private String logoUrl;

        @Column(name = "logo_url_transparent")
        private String logoUrlTransparent;

        @Transient
        public BrandCategory brandCategory;

        public int getId() {
                return id;
        }

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

        public String getName() {
                return name;
        }

        public BrandCategory getBrandCategory() {
                return brandCategory;
        }

        public void setBrandCategory(BrandCategory brandCategory) {
                this.brandCategory = brandCategory;
        }

        public void setName(String name) {
                this.name = name;
        }

        public String getLogoUrl() {
                return logoUrl;
        }

        public void setLogoUrl(String logoUrl) {
                this.logoUrl = logoUrl;
        }

        public String getLogoUrlTransparent() {
                return logoUrlTransparent;
        }

        public void setLogoUrlTransparent(String logoUrlTransparent) {
                this.logoUrlTransparent = logoUrlTransparent;
        }

        @Override
        public int hashCode() {
                return Objects.hash(id, logoUrl, logoUrlTransparent, name);
        }

        @Override
        public boolean equals(Object obj) {
                if (this == obj)
                        return true;
                if (obj == null)
                        return false;
                if (getClass() != obj.getClass())
                        return false;
                BrandCatalog other = (BrandCatalog) obj;
                return id == other.id && Objects.equals(logoUrl, other.logoUrl)
                                && Objects.equals(logoUrlTransparent, other.logoUrlTransparent) && Objects.equals(name, other.name);
        }

        @Override
        public String toString() {
                return "Brand [id=" + id + ", name=" + name + ", logoUrl=" + logoUrl + ", logoUrlTransparent="
                                + logoUrlTransparent + "]";
        }

}