Subversion Repositories SmartDukaan

Rev

Rev 28019 | Rev 30755 | 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 smartPhone;
    private boolean featuredPhone;
    private List<String> brands;
    private List<Integer> itemIds;

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



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

        public float getStartPrice() {
        return startPrice;
    }
    

    public List<Integer> getItemIds() {
                return itemIds;
        }

        public void setItemIds(List<Integer> itemIds) {
                this.itemIds = itemIds;
        }



        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 List<String> getBrands() {
        return brands;
    }


    public boolean isSmartPhone() {
                return smartPhone;
        }



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



        public boolean isFeaturedPhone() {
                return featuredPhone;
        }



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



        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 + ", smartPhone=" + smartPhone
                                + ", featuredPhone=" + featuredPhone + ", brands=" + brands + ", itemIds=" + itemIds + "]";
        }


    @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 + (featuredPhone ? 1231 : 1237);
                result = prime * result + id;
                result = prime * result + ((itemIds == null) ? 0 : itemIds.hashCode());
                result = prime * result + (smartPhone ? 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 (featuredPhone != other.featuredPhone)
                        return false;
                if (id != other.id)
                        return false;
                if (itemIds == null) {
                        if (other.itemIds != null)
                                return false;
                } else if (!itemIds.equals(other.itemIds))
                        return false;
                if (smartPhone != other.smartPhone)
                        return false;
                if (Float.floatToIntBits(startPrice) != Float.floatToIntBits(other.startPrice))
                        return false;
                return true;
        }


}