Subversion Repositories SmartDukaan

Rev

Rev 28019 | Go to most recent revision | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed

package com.spice.profitmandi.service.offers;

import java.util.List;

public class ItemCriteria {
        private int id;
    private float startPrice;
    private float endPrice;
    private List<Integer> catalogIds;
    private List<Integer> excludeCatalogIds;
    private boolean isSmartPhone;
    private boolean isFeaturedPhone;
    private List<String> brands;

    public List<Integer> getExcludeCatalogIds() {
                return excludeCatalogIds;
        }



        public void setExcludeCatalogIds(List<Integer> excludeCatalogIds) {
                this.excludeCatalogIds = excludeCatalogIds;
        }



        public float getStartPrice() {
        return startPrice;
    }
    
    


    public int getId() {
                return id;
        }

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

        public void setStartPrice(float startPrice) {
        this.startPrice = startPrice;
    }


    public float getEndPrice() {
        return endPrice;
    }


    public void setEndPrice(float endPrice) {
        this.endPrice = endPrice;
    }


    public List<Integer> getCatalogIds() {
        return catalogIds;
    }


    public void setCatalogIds(List<Integer> catalogIds) {
        this.catalogIds = catalogIds;
    }


    public boolean isSmartPhone() {
        return isSmartPhone;
    }


    public void setSmartPhone(boolean isSmartPhone) {
        this.isSmartPhone = isSmartPhone;
    }


    public boolean isFeaturedPhone() {
        return isFeaturedPhone;
    }


    public void setFeaturedPhone(boolean isFeaturedPhone) {
        this.isFeaturedPhone = isFeaturedPhone;
    }


    public List<String> getBrands() {
        return brands;
    }


    public void setBrands(List<String> brands) {
        this.brands = brands;
    }


    @Override
        public String toString() {
                return "ItemCriteria [id=" + id + ", startPrice=" + startPrice + ", endPrice=" + endPrice + ", catalogIds="
                                + catalogIds + ", excludeCatalogIds=" + excludeCatalogIds + ", isSmartPhone=" + isSmartPhone
                                + ", isFeaturedPhone=" + isFeaturedPhone + ", brands=" + brands + "]";
        }


    @Override
        public int hashCode() {
                final int prime = 31;
                int result = 1;
                result = prime * result + ((brands == null) ? 0 : brands.hashCode());
                result = prime * result + ((catalogIds == null) ? 0 : catalogIds.hashCode());
                result = prime * result + Float.floatToIntBits(endPrice);
                result = prime * result + ((excludeCatalogIds == null) ? 0 : excludeCatalogIds.hashCode());
                result = prime * result + id;
                result = prime * result + (isFeaturedPhone ? 1231 : 1237);
                result = prime * result + (isSmartPhone ? 1231 : 1237);
                result = prime * result + Float.floatToIntBits(startPrice);
                return result;
        }


    @Override
        public boolean equals(Object obj) {
                if (this == obj)
                        return true;
                if (obj == null)
                        return false;
                if (getClass() != obj.getClass())
                        return false;
                ItemCriteria other = (ItemCriteria) obj;
                if (brands == null) {
                        if (other.brands != null)
                                return false;
                } else if (!brands.equals(other.brands))
                        return false;
                if (catalogIds == null) {
                        if (other.catalogIds != null)
                                return false;
                } else if (!catalogIds.equals(other.catalogIds))
                        return false;
                if (Float.floatToIntBits(endPrice) != Float.floatToIntBits(other.endPrice))
                        return false;
                if (excludeCatalogIds == null) {
                        if (other.excludeCatalogIds != null)
                                return false;
                } else if (!excludeCatalogIds.equals(other.excludeCatalogIds))
                        return false;
                if (id != other.id)
                        return false;
                if (isFeaturedPhone != other.isFeaturedPhone)
                        return false;
                if (isSmartPhone != other.isSmartPhone)
                        return false;
                if (Float.floatToIntBits(startPrice) != Float.floatToIntBits(other.startPrice))
                        return false;
                return true;
        }


}