Lesson12 HW10 · JavaWebinar/basejava@4e75634 · GitHub
Skip to content

Commit 4e75634

Browse files
author
Tanechka
committed
Lesson12 HW10
1 parent a34c2ee commit 4e75634

3 files changed

Lines changed: 119 additions & 19 deletions

File tree

src/ru/javawebinar/basejava/model/Link.java

Lines changed: 1 addition & 1 deletion

src/ru/javawebinar/basejava/model/Organization.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ public Organization(Link homePage, List<Position> positions) {
3535
this.positions = positions;
3636
}
3737

38+
public Link getHomePage() {
39+
return homePage;
40+
}
41+
42+
public List<Position> getPositions() {
43+
return positions;
44+
}
45+
3846
@Override
3947
public boolean equals(Object o) {
4048
if (this == o) return true;
@@ -54,10 +62,6 @@ public String toString() {
5462
return "Organization(" + homePage + "," + positions + ')';
5563
}
5664

57-
/**
58-
* gkislin
59-
* 28.07.2016
60-
*/
6165
@XmlAccessorType(XmlAccessType.FIELD)
6266
public static class Position implements Serializable {
6367
@XmlJavaTypeAdapter(LocalDateAdapter.class)
@@ -85,7 +89,7 @@ public Position(LocalDate startDate, LocalDate endDate, String title, String des
8589
this.startDate = startDate;
8690
this.endDate = endDate;
8791
this.title = title;
88-
this.description = description;
92+
this.description = description == null ? "" : description;
8993
}
9094

9195
public LocalDate getStartDate() {
@@ -125,4 +129,4 @@ public String toString() {
125129
return "Position(" + startDate + ',' + endDate + ',' + title + ',' + description + ')';
126130
}
127131
}
128-
}
132+
}
Lines changed: 108 additions & 12 deletions

0 commit comments

Comments
 (0)