Subversion Repositories SmartDukaan

Rev

View as "text/plain" | Blame | Last modification | View Log | RSS feed

package com.spice.profitmandi.dao.model;

public class SamsungUpgradeOfferModel {

        private String brand;
        private long amount;
        private String yearMonth;

        public SamsungUpgradeOfferModel(String brand, long amount, String yearMonth) {
                super();
                this.brand = brand;
                this.amount = amount;
                this.yearMonth = yearMonth;
        }

        public String getBrand() {
                return brand;
        }

        public void setBrand(String brand) {
                this.brand = brand;
        }

        public long getAmount() {
                return amount;
        }

        public void setAmount(long amount) {
                this.amount = amount;
        }

        public String getYearMonth() {
                return yearMonth;
        }

        public void setYearMonth(String yearMonth) {
                this.yearMonth = yearMonth;
        }

        @Override
        public int hashCode() {
                final int prime = 31;
                int result = 1;
                result = prime * result + (int) (amount ^ (amount >>> 32));
                result = prime * result + ((brand == null) ? 0 : brand.hashCode());
                result = prime * result + ((yearMonth == null) ? 0 : yearMonth.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;
                SamsungUpgradeOfferModel other = (SamsungUpgradeOfferModel) obj;
                if (amount != other.amount)
                        return false;
                if (brand == null) {
                        if (other.brand != null)
                                return false;
                } else if (!brand.equals(other.brand))
                        return false;
                if (yearMonth == null) {
                        if (other.yearMonth != null)
                                return false;
                } else if (!yearMonth.equals(other.yearMonth))
                        return false;
                return true;
        }

        @Override
        public String toString() {
                return "SamsungUpgradeOfferModel [brand=" + brand + ", amount=" + amount + ", yearMonth=" + yearMonth + "]";
        }

}