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

import java.io.Serializable;

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;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * This class basically contains api details
 * 
 * @author ashikali
 *
 */
@Entity
@Table(name = "dtr.web_product_listing", schema = "dtr")
public class WebProductListing implements Serializable {

        private static final long serialVersionUID = 1L;
        @JsonProperty(defaultValue="0")
        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        private int id;

        @Column(name = "web_listing_id")
        private int webListingId;

        @Column(name = "entity_id")
        private int entityId;

        @JsonProperty(defaultValue="0")
        @Column(name = "rank")
        private int rank;
        
        @Transient
        private String productName;
        

        public String getProductName() {
                return productName;
        }

        public void setProductName(String productName) {
                this.productName = productName;
        }

        public int getId() {
                return id;
        }

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

        public int getWebListingId() {
                return webListingId;
        }

        public void setWebListingId(int webListingId) {
                this.webListingId = webListingId;
        }

        public int getEntityId() {
                return entityId;
        }

        public void setEntityId(int entityId) {
                this.entityId = entityId;
        }

        public int getRank() {
                return rank;
        }

        public void setRank(int rank) {
                this.rank = rank;
        }

        @Override
        public String toString() {
                return "WebProductListing [id=" + id + ", webListingId=" + webListingId + ", entityId=" + entityId + ", rank="
                                + rank + "]";
        }

        @Override
        public int hashCode() {
                final int prime = 31;
                int result = 1;
                result = prime * result + entityId;
                result = prime * result + id;
                result = prime * result + rank;
                result = prime * result + webListingId;
                return result;
        }

        @Override
        public boolean equals(Object obj) {
                if (this == obj)
                        return true;
                if (obj == null)
                        return false;
                if (getClass() != obj.getClass())
                        return false;
                WebProductListing other = (WebProductListing) obj;
                if (entityId != other.entityId)
                        return false;
                if (id != other.id)
                        return false;
                if (rank != other.rank)
                        return false;
                if (webListingId != other.webListingId)
                        return false;
                return true;
        }
        
        

}