Subversion Repositories SmartDukaan

Rev

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

package com.spice.profitmandi.web.controller.giftcoupon;

public class GiftCard {
        String imageUrl;
        String title;
        float sellingPrice;
        int itemId;
        
        public String getTitle() {
                return title;
        }
        public void setTitle(String title) {
                this.title = title;
        }
        public String getImageUrl() {
                return imageUrl;
        }
        public void setImageUrl(String imageUrl) {
                this.imageUrl = imageUrl;
        }
        public float getSellingPrice() {
                return sellingPrice;
        }
        public void setSellingPrice(float sellingPrice) {
                this.sellingPrice = sellingPrice;
        }
        public int getItemId() {
                return itemId;
        }
        public void setItemId(int itemId) {
                this.itemId = itemId;
        }
        @Override
        public int hashCode() {
                final int prime = 31;
                int result = 1;
                result = prime * result + ((imageUrl == null) ? 0 : imageUrl.hashCode());
                result = prime * result + itemId;
                result = prime * result + Float.floatToIntBits(sellingPrice);
                result = prime * result + ((title == null) ? 0 : title.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;
                GiftCard other = (GiftCard) obj;
                if (imageUrl == null) {
                        if (other.imageUrl != null)
                                return false;
                } else if (!imageUrl.equals(other.imageUrl))
                        return false;
                if (itemId != other.itemId)
                        return false;
                if (Float.floatToIntBits(sellingPrice) != Float.floatToIntBits(other.sellingPrice))
                        return false;
                if (title == null) {
                        if (other.title != null)
                                return false;
                } else if (!title.equals(other.title))
                        return false;
                return true;
        }
        
        
}