Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
23637 amit.gupta 1
package com.spice.profitmandi.common.model;
2
 
24509 amit.gupta 3
import java.util.ArrayList;
4
import java.util.HashMap;
5
import java.util.List;
6
import java.util.Map;
7
 
8
import com.spice.profitmandi.common.enumuration.ReporticoParams;
9
 
23637 amit.gupta 10
public class ReporticoUrlInfo {
24509 amit.gupta 11
	@Override
12
	public int hashCode() {
13
		final int prime = 31;
14
		int result = 1;
15
		result = prime * result + ((description == null) ? 0 : description.hashCode());
16
		result = prime * result + ((title == null) ? 0 : title.hashCode());
17
		result = prime * result + ((url == null) ? 0 : url.hashCode());
18
		return result;
19
	}
20
 
21
	@Override
22
	public boolean equals(Object obj) {
23
		if (this == obj)
24
			return true;
25
		if (obj == null)
26
			return false;
27
		if (getClass() != obj.getClass())
28
			return false;
29
		ReporticoUrlInfo other = (ReporticoUrlInfo) obj;
30
		if (description == null) {
31
			if (other.description != null)
32
				return false;
33
		} else if (!description.equals(other.description))
34
			return false;
35
		if (title == null) {
36
			if (other.title != null)
37
				return false;
38
		} else if (!title.equals(other.title))
39
			return false;
40
		if (url == null) {
41
			if (other.url != null)
42
				return false;
43
		} else if (!url.equals(other.url))
44
			return false;
45
		return true;
46
	}
47
 
23637 amit.gupta 48
	private String url;
49
	private String title;
50
	private String description;
24509 amit.gupta 51
	private List<ReporticoParams> paramsList = new ArrayList<>();
52
 
53
	public ReporticoUrlInfo addParam(List<String> paramNames, ReporticoParams.Type paramType, String paramDisplay) {
54
		paramsList.add(new ReporticoParams(paramNames, paramType, paramDisplay));
55
		return this;
56
	}
57
 
58
	/**
59
	 * @param url
60
	 * @param title
61
	 * @param description
62
	 */
23637 amit.gupta 63
	public ReporticoUrlInfo(String url, String title, String description) {
64
		super();
65
		this.url = url;
66
		this.title = title;
67
		this.description = description;
68
	}
24509 amit.gupta 69
 
70
	public List<ReporticoParams> getParamsList() {
71
		return paramsList;
72
	}
73
 
23637 amit.gupta 74
	@Override
75
	public String toString() {
76
		return "ReportUrl [url=" + url + ", title=" + title + ", description=" + description + "]";
77
	}
24509 amit.gupta 78
 
23637 amit.gupta 79
	public String getUrl() {
80
		return url;
81
	}
24509 amit.gupta 82
 
23637 amit.gupta 83
	public void setUrl(String url) {
84
		this.url = url;
85
	}
24509 amit.gupta 86
 
23637 amit.gupta 87
	public String getTitle() {
88
		return title;
89
	}
24509 amit.gupta 90
 
23637 amit.gupta 91
	public void setTitle(String title) {
92
		this.title = title;
93
	}
24509 amit.gupta 94
 
23637 amit.gupta 95
	public String getDescription() {
96
		return description;
97
	}
24509 amit.gupta 98
 
23637 amit.gupta 99
	public void setDescription(String description) {
100
		this.description = description;
101
	}
102
}