Subversion Repositories SmartDukaan

Rev

Rev 22653 | 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.io.Serializable;

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

/**
 * This class basically contains tag details
 * 
 * @author ashikali
 *
 */
@Entity
@Table(name="catalog.retailer_scheme", schema = "catalog", uniqueConstraints = {@UniqueConstraint(columnNames = {"retailer_id","scheme_id"})})

public class RetailerScheme implements Serializable{
        
        private static final long serialVersionUID = 1L;
        
        public RetailerScheme() {
        }
        
        @Id
        @Column(name="retailer_id")
        private int retailerId;
        
        @Id
        @Column(name = "scheme_id")
        private int schemeId;
        
        public int getRetailerId() {
                return retailerId;
        }
        public void setRetailerId(int retailerId) {
                this.retailerId = retailerId;
        }
        public int getSchemeId() {
                return schemeId;
        }
        public void setSchemeId(int schemeId) {
                this.schemeId = schemeId;
        }
    
        @Override
        public int hashCode() {
                final int prime = 31;
                int result = 1;
                result = prime * result + retailerId;
                result = prime * result + schemeId;
                return result;
        }
        @Override
        public boolean equals(Object obj) {
                if (this == obj)
                        return true;
                if (obj == null)
                        return false;
                if (getClass() != obj.getClass())
                        return false;
                RetailerScheme other = (RetailerScheme) obj;
                if (retailerId != other.retailerId)
                        return false;
                if (schemeId != other.schemeId)
                        return false;
                return true;
        }
        @Override
        public String toString() {
                return "RetailerSchemeTag [retailerId=" + retailerId + ", schemeId=" + schemeId + "]";
        }

}