Subversion Repositories SmartDukaan

Rev

Rev 24509 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 24509 Rev 26066
Line 1... Line 1...
1
package com.spice.profitmandi.common.model;
1
package com.spice.profitmandi.common.model;
2
 
2
 
3
import java.util.ArrayList;
3
import java.util.ArrayList;
4
import java.util.HashMap;
-
 
5
import java.util.List;
4
import java.util.List;
6
import java.util.Map;
-
 
7
 
5
 
8
import com.spice.profitmandi.common.enumuration.ReporticoParams;
6
import com.spice.profitmandi.common.enumuration.ReporticoParams;
-
 
7
import com.spice.profitmandi.common.enumuration.ReporticoProject;
9
 
8
 
10
public class ReporticoUrlInfo {
9
public class ReporticoUrlInfo {
11
	@Override
10
	@Override
12
	public int hashCode() {
11
	public int hashCode() {
13
		final int prime = 31;
12
		final int prime = 31;
14
		int result = 1;
13
		int result = 1;
15
		result = prime * result + ((description == null) ? 0 : description.hashCode());
14
		result = prime * result + ((description == null) ? 0 : description.hashCode());
-
 
15
		result = prime * result + ((paramsList == null) ? 0 : paramsList.hashCode());
-
 
16
		result = prime * result + ((reporticoProject == null) ? 0 : reporticoProject.hashCode());
16
		result = prime * result + ((title == null) ? 0 : title.hashCode());
17
		result = prime * result + ((title == null) ? 0 : title.hashCode());
17
		result = prime * result + ((url == null) ? 0 : url.hashCode());
18
		result = prime * result + ((url == null) ? 0 : url.hashCode());
18
		return result;
19
		return result;
19
	}
20
	}
20
 
21
 
Line 30... Line 31...
30
		if (description == null) {
31
		if (description == null) {
31
			if (other.description != null)
32
			if (other.description != null)
32
				return false;
33
				return false;
33
		} else if (!description.equals(other.description))
34
		} else if (!description.equals(other.description))
34
			return false;
35
			return false;
-
 
36
		if (paramsList == null) {
-
 
37
			if (other.paramsList != null)
-
 
38
				return false;
-
 
39
		} else if (!paramsList.equals(other.paramsList))
-
 
40
			return false;
-
 
41
		if (reporticoProject != other.reporticoProject)
-
 
42
			return false;
35
		if (title == null) {
43
		if (title == null) {
36
			if (other.title != null)
44
			if (other.title != null)
37
				return false;
45
				return false;
38
		} else if (!title.equals(other.title))
46
		} else if (!title.equals(other.title))
39
			return false;
47
			return false;
Line 46... Line 54...
46
	}
54
	}
47
 
55
 
48
	private String url;
56
	private String url;
49
	private String title;
57
	private String title;
50
	private String description;
58
	private String description;
-
 
59
	private ReporticoProject reporticoProject;
-
 
60
	public ReporticoProject getReporticoProject() {
-
 
61
		return reporticoProject;
-
 
62
	}
-
 
63
 
-
 
64
	public void setReporticoProject(ReporticoProject reporticoProject) {
-
 
65
		this.reporticoProject = reporticoProject;
-
 
66
	}
-
 
67
 
51
	private List<ReporticoParams> paramsList = new ArrayList<>();
68
	public void setParamsList(List<ReporticoParams> paramsList) {
-
 
69
		this.paramsList = paramsList;
-
 
70
	}
52
 
71
 
-
 
72
	private List<ReporticoParams> paramsList = null;
-
 
73
 
53
	public ReporticoUrlInfo addParam(List<String> paramNames, ReporticoParams.Type paramType, String paramDisplay) {
74
	public ReporticoUrlInfo addParam(String paramName, ReporticoParams.Type paramType, String paramDisplay) {
-
 
75
		if(paramsList == null) {
-
 
76
			paramsList = new ArrayList<>();
-
 
77
		}
54
		paramsList.add(new ReporticoParams(paramNames, paramType, paramDisplay));
78
		paramsList.add(new ReporticoParams(paramName, paramType, paramDisplay));
55
		return this;
79
		return this;
56
	}
80
	}
57
 
81
 
58
	/**
82
	/**
59
	 * @param url
83
	 * @param url
60
	 * @param title
84
	 * @param title
61
	 * @param description
85
	 * @param description
62
	 */
86
	 */
-
 
87
	public ReporticoUrlInfo(ReporticoProject reporticoProject, String url, String title, String description) {
-
 
88
		super();
-
 
89
		this.url = url;
-
 
90
		this.title = title;
-
 
91
		this.description = description;
-
 
92
		this.reporticoProject = reporticoProject;
-
 
93
	}
-
 
94
 
63
	public ReporticoUrlInfo(String url, String title, String description) {
95
	public ReporticoUrlInfo(String url, String title, String description) {
64
		super();
96
		super();
65
		this.url = url;
97
		this.url = url;
66
		this.title = title;
98
		this.title = title;
67
		this.description = description;
99
		this.description = description;
Line 71... Line 103...
71
		return paramsList;
103
		return paramsList;
72
	}
104
	}
73
 
105
 
74
	@Override
106
	@Override
75
	public String toString() {
107
	public String toString() {
76
		return "ReportUrl [url=" + url + ", title=" + title + ", description=" + description + "]";
108
		return "ReporticoUrlInfo [url=" + url + ", title=" + title + ", description=" + description
-
 
109
				+ ", reporticoProject=" + reporticoProject + ", paramsList=" + paramsList + "]";
77
	}
110
	}
78
 
111
 
79
	public String getUrl() {
112
	public String getUrl() {
80
		return url;
113
		return url;
81
	}
114
	}