Subversion Repositories SmartDukaan

Rev

Rev 23637 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

package com.spice.profitmandi.common.model;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.spice.profitmandi.common.enumuration.ReporticoParams;

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

        private String url;
        private String title;
        private String description;
        private List<ReporticoParams> paramsList = new ArrayList<>();

        public ReporticoUrlInfo addParam(List<String> paramNames, ReporticoParams.Type paramType, String paramDisplay) {
                paramsList.add(new ReporticoParams(paramNames, paramType, paramDisplay));
                return this;
        }

        /**
         * @param url
         * @param title
         * @param description
         */
        public ReporticoUrlInfo(String url, String title, String description) {
                super();
                this.url = url;
                this.title = title;
                this.description = description;
        }

        public List<ReporticoParams> getParamsList() {
                return paramsList;
        }

        @Override
        public String toString() {
                return "ReportUrl [url=" + url + ", title=" + title + ", description=" + description + "]";
        }

        public String getUrl() {
                return url;
        }

        public void setUrl(String url) {
                this.url = url;
        }

        public String getTitle() {
                return title;
        }

        public void setTitle(String title) {
                this.title = title;
        }

        public String getDescription() {
                return description;
        }

        public void setDescription(String description) {
                this.description = description;
        }
}