Change names of properties for start and end page of an article

pull/1/head
Jens Pelzetter 2019-09-05 11:02:54 +02:00
parent 5d95786be4
commit 1f3a4a0baa
2 changed files with 40 additions and 40 deletions

View File

@ -32,11 +32,11 @@ public class ArticleInCollectedVolume extends Publication {
@JoinColumn(name = "COLLECTED_VOLUME_ID") @JoinColumn(name = "COLLECTED_VOLUME_ID")
private CollectedVolume collectedVolume; private CollectedVolume collectedVolume;
@Column(name = "PAGES_FROM") @Column(name = "START_PAGE")
private Integer pagesFrom; private Integer startPage;
@Column(name = "PAGES_TO") @Column(name = "END_PAGE")
private Integer pagesTo; private Integer endPage;
@Column(name = "CHAPTER", length = 1024) @Column(name = "CHAPTER", length = 1024)
private String chapter; private String chapter;
@ -49,20 +49,20 @@ public class ArticleInCollectedVolume extends Publication {
this.collectedVolume = collectedVolume; this.collectedVolume = collectedVolume;
} }
public Integer getPagesFrom() { public Integer getStartPage() {
return pagesFrom; return startPage;
} }
public void setPagesFrom(final Integer pagesFrom) { public void setStartPage(final Integer startPage) {
this.pagesFrom = pagesFrom; this.startPage = startPage;
} }
public Integer getPagesTo() { public Integer getEndPage() {
return pagesTo; return endPage;
} }
public void setPagesTo(final Integer pagesTo) { public void setEndPage(final Integer endPage) {
this.pagesTo = pagesTo; this.endPage = endPage;
} }
public String getChapter() { public String getChapter() {
@ -77,8 +77,8 @@ public class ArticleInCollectedVolume extends Publication {
public int hashCode() { public int hashCode() {
int hash = super.hashCode(); int hash = super.hashCode();
hash = 47 * hash + Objects.hashCode(collectedVolume); hash = 47 * hash + Objects.hashCode(collectedVolume);
hash = 47 * hash + Objects.hashCode(pagesFrom); hash = 47 * hash + Objects.hashCode(startPage);
hash = 47 * hash + Objects.hashCode(pagesTo); hash = 47 * hash + Objects.hashCode(endPage);
hash = 47 * hash + Objects.hashCode(chapter); hash = 47 * hash + Objects.hashCode(chapter);
return hash; return hash;
} }
@ -107,10 +107,10 @@ public class ArticleInCollectedVolume extends Publication {
if (!Objects.equals(collectedVolume, other.getCollectedVolume())) { if (!Objects.equals(collectedVolume, other.getCollectedVolume())) {
return false; return false;
} }
if (!Objects.equals(pagesFrom, other.getPagesFrom())) { if (!Objects.equals(startPage, other.getStartPage())) {
return false; return false;
} }
return Objects.equals(pagesTo, other.getPagesTo()); return Objects.equals(endPage, other.getEndPage());
} }
@Override @Override
@ -123,12 +123,12 @@ public class ArticleInCollectedVolume extends Publication {
return super.toString(String.format(", collectedVolume = %s, " return super.toString(String.format(", collectedVolume = %s, "
+ "chapter = \"%s\", " + "chapter = \"%s\", "
+ "pagesFrom = %d, " + "startPage = %d, "
+ "pagesTo = %d%s", + "endPage = %d%s",
Objects.toString(collectedVolume), Objects.toString(collectedVolume),
chapter, chapter,
pagesFrom, startPage,
pagesTo, endPage,
data)); data));
} }

View File

@ -39,11 +39,11 @@ public class ArticleInJournal extends Publication {
@Column(name = "ISSUE") @Column(name = "ISSUE")
private String issue; private String issue;
@Column(name = "PAGES_FROM") @Column(name = "START_PAGE")
private Integer pagesFrom; private Integer startPage;
@Column(name = "PAGES_TO") @Column(name = "END_PAGE")
private Integer pagesTo; private Integer endPage;
@Column(name = "PUBLICATION_DATE") @Column(name = "PUBLICATION_DATE")
private LocalDate publicationDate; private LocalDate publicationDate;
@ -72,20 +72,20 @@ public class ArticleInJournal extends Publication {
this.issue = issue; this.issue = issue;
} }
public Integer getPagesFrom() { public Integer getStartPage() {
return pagesFrom; return startPage;
} }
public void setPagesFrom(final Integer pagesFrom) { public void setStartPage(final Integer startPage) {
this.pagesFrom = pagesFrom; this.startPage = startPage;
} }
public Integer getPagesTo() { public Integer getEndPage() {
return pagesTo; return endPage;
} }
public void setPagesTo(final Integer pagesTo) { public void setEndPage(final Integer endPage) {
this.pagesTo = pagesTo; this.endPage = endPage;
} }
public LocalDate getPublicationDate() { public LocalDate getPublicationDate() {
@ -102,8 +102,8 @@ public class ArticleInJournal extends Publication {
hash = 67 * hash + Objects.hashCode(journal); hash = 67 * hash + Objects.hashCode(journal);
hash = 67 * hash + Objects.hashCode(volume); hash = 67 * hash + Objects.hashCode(volume);
hash = 67 * hash + Objects.hashCode(issue); hash = 67 * hash + Objects.hashCode(issue);
hash = 67 * hash + Objects.hashCode(pagesFrom); hash = 67 * hash + Objects.hashCode(startPage);
hash = 67 * hash + Objects.hashCode(pagesTo); hash = 67 * hash + Objects.hashCode(endPage);
hash = 67 * hash + Objects.hashCode(publicationDate); hash = 67 * hash + Objects.hashCode(publicationDate);
return hash; return hash;
} }
@ -135,10 +135,10 @@ public class ArticleInJournal extends Publication {
if (!Objects.equals(issue, other.getIssue())) { if (!Objects.equals(issue, other.getIssue())) {
return false; return false;
} }
if (!Objects.equals(pagesFrom, other.getPagesFrom())) { if (!Objects.equals(startPage, other.getStartPage())) {
return false; return false;
} }
if (!Objects.equals(pagesTo, other.getPagesTo())) { if (!Objects.equals(endPage, other.getEndPage())) {
return false; return false;
} }
return Objects.equals(publicationDate, other.getPublicationDate()); return Objects.equals(publicationDate, other.getPublicationDate());
@ -154,14 +154,14 @@ public class ArticleInJournal extends Publication {
return super.toString(String.format(", journal = %s, " return super.toString(String.format(", journal = %s, "
+ "volume = %d, " + "volume = %d, "
+ "issue = \"%s\", " + "issue = \"%s\", "
+ "pagesFrom = %d, " + "startPage = %d, "
+ "pagesTo = %d, " + "endPage = %d, "
+ "publicationDate = %s%s", + "publicationDate = %s%s",
Objects.toString(journal), Objects.toString(journal),
volume, volume,
issue, issue,
pagesFrom, startPage,
pagesTo, endPage,
Objects.toString(publicationDate), Objects.toString(publicationDate),
data)); data));
} }