Subversion Repositories SmartDukaan

Rev

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

package com.spice.profitmandi.common.model;

public class BrandAggregateValue {
        private String brand;

        private long aggregateValue;

        public BrandAggregateValue(String brand, long aggregateValue) {
                super();
                this.brand = brand;
                this.aggregateValue = aggregateValue;
        }

        public String getBrand() {
                return brand;
        }

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

        public long getAggregateValue() {
                return aggregateValue;
        }

        public void setAggregateValue(long aggregateValue) {
                this.aggregateValue = aggregateValue;
        }

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

}