Subversion Repositories SmartDukaan

Rev

Rev 28949 | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed

package com.spice.profitmandi.dao.entity.inventory;

import java.time.LocalDateTime;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import com.spice.profitmandi.dao.enumuration.inventory.InventoryType;
import com.spice.profitmandi.dao.enumuration.inventory.WarehouseType;

@Entity
@Table(name = "inventory.warehouse")
public class Warehouse {

        @Id
        @Column(name = "id", unique = true, updatable = false)
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        private int id;
        private String displayName;
        private String location;
        private int status;
        private LocalDateTime addedOn;
        private LocalDateTime lastCheckedOn;
        private String tinNumber;
        private String pincode;
        private String vendorString;
        private String gstin;

        private Integer logisticsLocation;
        private Integer billingType;
        @Enumerated(EnumType.STRING)
        private WarehouseType warehouseType;

        @Enumerated(EnumType.STRING)
        private InventoryType inventoryType;
        @Column(name = "vendor_id")
        private int vendor;

        private int shippingWarehouseId;
        private int billingWarehouseId;
        private int isAvailabilityMonitored;
        private long transferDelayInHours;
        @Column(name = "state_id")
        private int stateId;
        private Integer source;

        public int getId() {
                return id;
        }

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

        public String getDisplayName() {
                return displayName;
        }

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

        public String getLocation() {
                return location;
        }

        public void setLocation(String location) {
                this.location = location;
        }

        public int getStatus() {
                return status;
        }

        public void setStatus(int status) {
                this.status = status;
        }

        public LocalDateTime getAddedOn() {
                return addedOn;
        }

        public void setAddedOn(LocalDateTime addedOn) {
                this.addedOn = addedOn;
        }

        public LocalDateTime getLastCheckedOn() {
                return lastCheckedOn;
        }

        public void setLastCheckedOn(LocalDateTime lastCheckedOn) {
                this.lastCheckedOn = lastCheckedOn;
        }

        public String getTinNumber() {
                return tinNumber;
        }

        public void setTinNumber(String tinNumber) {
                this.tinNumber = tinNumber;
        }

        public String getPincode() {
                return pincode;
        }

        public void setPincode(String pincode) {
                this.pincode = pincode;
        }

        public String getVendorString() {
                return vendorString;
        }

        public void setVendorString(String vendorString) {
                this.vendorString = vendorString;
        }

        public String getGstin() {
                return gstin;
        }

        public void setGstin(String gstin) {
                this.gstin = gstin;
        }

        public Integer getLogisticsLocation() {
                return logisticsLocation;
        }

        public void setLogisticsLocation(Integer logisticsLocation) {
                this.logisticsLocation = logisticsLocation;
        }

        public Integer getBillingType() {
                return billingType;
        }

        public void setBillingType(Integer billingType) {
                this.billingType = billingType;
        }

        public WarehouseType getWarehouseType() {
                return warehouseType;
        }

        public void setWarehouseType(WarehouseType warehouseType) {
                this.warehouseType = warehouseType;
        }

        public InventoryType getInventoryType() {
                return inventoryType;
        }

        public void setInventoryType(InventoryType inventoryType) {
                this.inventoryType = inventoryType;
        }

        public int getVendor() {
                return vendor;
        }

        public void setVendor(int vendor) {
                this.vendor = vendor;
        }

        public int getShippingWarehouseId() {
                return shippingWarehouseId;
        }

        public void setShippingWarehouseId(int shippingWarehouseId) {
                this.shippingWarehouseId = shippingWarehouseId;
        }

        public int getBillingWarehouseId() {
                return billingWarehouseId;
        }

        public void setBillingWarehouseId(int billingWarehouseId) {
                this.billingWarehouseId = billingWarehouseId;
        }

        public int getIsAvailabilityMonitored() {
                return isAvailabilityMonitored;
        }

        public void setIsAvailabilityMonitored(int isAvailabilityMonitored) {
                this.isAvailabilityMonitored = isAvailabilityMonitored;
        }

        public long getTransferDelayInHours() {
                return transferDelayInHours;
        }

        public void setTransferDelayInHours(long transferDelayInHours) {
                this.transferDelayInHours = transferDelayInHours;
        }

        public int getStateId() {
                return stateId;
        }

        public void setStateId(Integer stateId) {
                this.stateId = stateId;
        }

        public Integer getSource() {
                return source;
        }

        public void setSource(int source) {
                this.source = source;
        }

        @Override
        public String toString() {
                return "Warehouse [id=" + id + ", displayName=" + displayName + ", location=" + location + ", status=" + status
                                + ", addedOn=" + addedOn + ", lastCheckedOn=" + lastCheckedOn + ", tinNumber=" + tinNumber
                                + ", pincode=" + pincode + ", vendorString=" + vendorString + ", gstin=" + gstin
                                + ", logisticsLocation=" + logisticsLocation + ", billingType=" + billingType + ", warehouseType="
                                + warehouseType + ", inventoryType=" + inventoryType + ", vendor=" + vendor + ", shippingWarehouseId="
                                + shippingWarehouseId + ", billingWarehouseId=" + billingWarehouseId + ", isAvailabilityMonitored="
                                + isAvailabilityMonitored + ", transferDelayInHours=" + transferDelayInHours + ", stateId=" + stateId
                                + ", source=" + source + "]";
        }
        

        @Override
        public int hashCode() {
                final int prime = 31;
                int result = 1;
                result = prime * result + ((addedOn == null) ? 0 : addedOn.hashCode());
                result = prime * result + ((billingType == null) ? 0 : billingType.hashCode());
                result = prime * result + billingWarehouseId;
                result = prime * result + ((displayName == null) ? 0 : displayName.hashCode());
                result = prime * result + ((gstin == null) ? 0 : gstin.hashCode());
                result = prime * result + id;
                result = prime * result + ((inventoryType == null) ? 0 : inventoryType.hashCode());
                result = prime * result + isAvailabilityMonitored;
                result = prime * result + ((lastCheckedOn == null) ? 0 : lastCheckedOn.hashCode());
                result = prime * result + ((location == null) ? 0 : location.hashCode());
                result = prime * result + ((logisticsLocation == null) ? 0 : logisticsLocation.hashCode());
                result = prime * result + ((pincode == null) ? 0 : pincode.hashCode());
                result = prime * result + shippingWarehouseId;
                result = prime * result + ((source == null) ? 0 : source.hashCode());
                result = prime * result + stateId;
                result = prime * result + status;
                result = prime * result + ((tinNumber == null) ? 0 : tinNumber.hashCode());
                result = prime * result + (int) (transferDelayInHours ^ (transferDelayInHours >>> 32));
                result = prime * result + vendor;
                result = prime * result + ((vendorString == null) ? 0 : vendorString.hashCode());
                result = prime * result + ((warehouseType == null) ? 0 : warehouseType.hashCode());
                return result;
        }

        @Override
        public boolean equals(Object obj) {
                if (this == obj)
                        return true;
                if (obj == null)
                        return false;
                if (getClass() != obj.getClass())
                        return false;
                Warehouse other = (Warehouse) obj;
                if (addedOn == null) {
                        if (other.addedOn != null)
                                return false;
                } else if (!addedOn.equals(other.addedOn))
                        return false;
                if (billingType == null) {
                        if (other.billingType != null)
                                return false;
                } else if (!billingType.equals(other.billingType))
                        return false;
                if (billingWarehouseId != other.billingWarehouseId)
                        return false;
                if (displayName == null) {
                        if (other.displayName != null)
                                return false;
                } else if (!displayName.equals(other.displayName))
                        return false;
                if (gstin == null) {
                        if (other.gstin != null)
                                return false;
                } else if (!gstin.equals(other.gstin))
                        return false;
                if (id != other.id)
                        return false;
                if (inventoryType != other.inventoryType)
                        return false;
                if (isAvailabilityMonitored != other.isAvailabilityMonitored)
                        return false;
                if (lastCheckedOn == null) {
                        if (other.lastCheckedOn != null)
                                return false;
                } else if (!lastCheckedOn.equals(other.lastCheckedOn))
                        return false;
                if (location == null) {
                        if (other.location != null)
                                return false;
                } else if (!location.equals(other.location))
                        return false;
                if (logisticsLocation == null) {
                        if (other.logisticsLocation != null)
                                return false;
                } else if (!logisticsLocation.equals(other.logisticsLocation))
                        return false;
                if (pincode == null) {
                        if (other.pincode != null)
                                return false;
                } else if (!pincode.equals(other.pincode))
                        return false;
                if (shippingWarehouseId != other.shippingWarehouseId)
                        return false;
                if (source == null) {
                        if (other.source != null)
                                return false;
                } else if (!source.equals(other.source))
                        return false;
                if (stateId != other.stateId)
                        return false;
                if (status != other.status)
                        return false;
                if (tinNumber == null) {
                        if (other.tinNumber != null)
                                return false;
                } else if (!tinNumber.equals(other.tinNumber))
                        return false;
                if (transferDelayInHours != other.transferDelayInHours)
                        return false;
                if (vendor != other.vendor)
                        return false;
                if (vendorString == null) {
                        if (other.vendorString != null)
                                return false;
                } else if (!vendorString.equals(other.vendorString))
                        return false;
                if (warehouseType != other.warehouseType)
                        return false;
                return true;
        }

        public Warehouse() {
                super();
                // TODO Auto-generated constructor stub
        }

}