Subversion Repositories SmartDukaan

Rev

Go to most recent revision | 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;
import java.io.Serializable;
import java.util.Objects;

@Entity
@Table(name = "fofo.scheme_region", schema = "fofo")
public class SchemeRegion implements Serializable {

        private static final long serialVersionUID = 1L;

        @Id
        @Column(name = "scheme_id")
        private int schemeId;

        @Id
        @Column(name = "region_id")
        private int regionId;

        @Override
        public boolean equals(Object o) {
                if (this == o) return true;
                if (o == null || getClass() != o.getClass()) return false;
                SchemeRegion that = (SchemeRegion) o;
                return schemeId == that.schemeId && regionId == that.regionId;
        }

        @Override
        public int hashCode() {
                return Objects.hash(schemeId, regionId);
        }

        @Override
        public String toString() {
                return "SchemeRegion{" +
                                "schemeId=" + schemeId +
                                ", catalogId=" + regionId +
                                '}';
        }

        public int getSchemeId() {
                return schemeId;
        }

        public void setSchemeId(int schemeId) {
                this.schemeId = schemeId;
        }

        public int getRegionId() {
                return regionId;
        }

        public void setRegionId(int catalogId) {
                this.regionId = catalogId;
        }
}