1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.rundeck.api.domain;
17
18 import java.io.Serializable;
19
20
21
22
23
24
25 public class RundeckProject implements Serializable {
26
27 private static final long serialVersionUID = 1L;
28
29 private String name;
30
31 private String description;
32
33 private String resourceModelProviderUrl;
34
35 private ProjectConfig projectConfig;
36
37 public String getName() {
38 return name;
39 }
40
41 public void setName(String name) {
42 this.name = name;
43 }
44
45 public String getDescription() {
46 return description;
47 }
48
49 public void setDescription(String description) {
50 this.description = description;
51 }
52
53 public String getResourceModelProviderUrl() {
54 return resourceModelProviderUrl;
55 }
56
57 public void setResourceModelProviderUrl(String resourceModelProviderUrl) {
58 this.resourceModelProviderUrl = resourceModelProviderUrl;
59 }
60
61 public ProjectConfig getProjectConfig() {
62 return projectConfig;
63 }
64
65 public void setProjectConfig(ProjectConfig projectConfig) {
66 this.projectConfig = projectConfig;
67 }
68
69 @Override
70 public String toString() {
71 return "RundeckProject [name=" + name + ", description=" + description
72 + (null!=resourceModelProviderUrl? ", resourceModelProviderUrl=" + resourceModelProviderUrl : "")
73 + ", config="
74 + projectConfig + "]";
75 }
76
77 @Override
78 public int hashCode() {
79 final int prime = 31;
80 int result = 1;
81 result = prime * result + ((description == null) ? 0 : description.hashCode());
82 result = prime * result + ((name == null) ? 0 : name.hashCode());
83 result = prime * result + ((resourceModelProviderUrl == null) ? 0 : resourceModelProviderUrl.hashCode());
84 result = prime * result + ((projectConfig == null) ? 0 : projectConfig.hashCode());
85 return result;
86 }
87
88 @Override
89 public boolean equals(Object obj) {
90 if (this == obj)
91 return true;
92 if (obj == null)
93 return false;
94 if (getClass() != obj.getClass())
95 return false;
96 RundeckProject other = (RundeckProject) obj;
97 if (description == null) {
98 if (other.description != null)
99 return false;
100 } else if (!description.equals(other.description))
101 return false;
102 if (name == null) {
103 if (other.name != null)
104 return false;
105 } else if (!name.equals(other.name))
106 return false;
107 if (resourceModelProviderUrl == null) {
108 if (other.resourceModelProviderUrl != null)
109 return false;
110 } else if (!resourceModelProviderUrl.equals(other.resourceModelProviderUrl))
111 return false;
112 if (projectConfig == null) {
113 if (other.projectConfig != null)
114 return false;
115 } else if (!projectConfig.equals(other.projectConfig))
116 return false;
117 return true;
118 }
119 }