forked from jenkinsci/gitlab-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCommit.java
More file actions
100 lines (84 loc) · 2.52 KB
/
Copy pathCommit.java
File metadata and controls
100 lines (84 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
package com.dabsquared.gitlabjenkins.gitlab.api.model;
import java.util.Date;
import net.karneim.pojobuilder.GeneratePojoBuilder;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
/**
* @author Robin Müller
*/
@GeneratePojoBuilder(intoPackage = "*.builder.generated", withFactoryMethod = "*")
public class Commit {
private String id;
private String message;
private Date authoredDate;
private String authorName;
private String authorEmail;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public Date getAuthoredDate() {
return authoredDate;
}
public void setAuthoredDate(Date authoredDate) {
this.authoredDate = authoredDate;
}
public String getAuthorName() {
return authorName;
}
public void setAuthorName(String authorName) {
this.authorName = authorName;
}
public String getAuthorEmail() {
return authorEmail;
}
public void setAuthorEmail(String authorEmail) {
this.authorEmail = authorEmail;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Commit commit = (Commit) o;
return new EqualsBuilder()
.append(id, commit.id)
.append(message, commit.message)
.append(authoredDate, commit.authoredDate)
.append(authorName, commit.authorName)
.append(authorEmail, commit.authorEmail)
.isEquals();
}
@Override
public int hashCode() {
return new HashCodeBuilder(17, 37)
.append(id)
.append(message)
.append(authoredDate)
.append(authorName)
.append(authorEmail)
.toHashCode();
}
@Override
public String toString() {
return new ToStringBuilder(this)
.append("id", id)
.append("message", message)
.append("authoredDate", authoredDate)
.append("authorName", authorName)
.append("authorEmail", authorEmail)
.toString();
}
}