This repository has been archived by the owner on Apr 12, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #131 from open-prevo/feature/35_hub_persistence
Persistence of notifications sent from the hub
- Loading branch information
Showing
20 changed files
with
458 additions
and
302 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
107 changes: 7 additions & 100 deletions
107
encrypted-data-model/src/main/java/ch/prevo/open/encrypted/model/MatchForCommencement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,119 +1,26 @@ | ||
package ch.prevo.open.encrypted.model; | ||
|
||
import java.time.LocalDate; | ||
|
||
import org.apache.commons.lang3.builder.ToStringBuilder; | ||
import org.apache.commons.lang3.builder.ToStringStyle; | ||
|
||
import java.time.LocalDate; | ||
|
||
/** | ||
* Matching notification sent to an OpenPrevo Node. | ||
*/ | ||
public class MatchForCommencement { | ||
|
||
private String encryptedOasiNumber; | ||
private String retirementFundUid; | ||
private String previousRetirementFundUid; | ||
private LocalDate commencementDate; | ||
private LocalDate terminationDate; | ||
|
||
public MatchForCommencement() {} | ||
|
||
public MatchForCommencement(String encryptedOasiNumber, | ||
String retirementFundUid, | ||
String previousRetirementFundUid, | ||
LocalDate commencementDate, | ||
LocalDate terminationDate) { | ||
this.encryptedOasiNumber = encryptedOasiNumber; | ||
this.retirementFundUid = retirementFundUid; | ||
this.previousRetirementFundUid = previousRetirementFundUid; | ||
this.commencementDate = commencementDate; | ||
this.terminationDate = terminationDate; | ||
} | ||
|
||
public String getEncryptedOasiNumber() { | ||
return encryptedOasiNumber; | ||
} | ||
|
||
public void setEncryptedOasiNumber(String encryptedOasiNumber) { | ||
this.encryptedOasiNumber = encryptedOasiNumber; | ||
} | ||
|
||
public String getRetirementFundUid() { | ||
return retirementFundUid; | ||
} | ||
|
||
public void setRetirementFundUid(String retirementFundUid) { | ||
this.retirementFundUid = retirementFundUid; | ||
} | ||
public class MatchForCommencement extends MatchNotification { | ||
|
||
public String getPreviousRetirementFundUid() { | ||
return previousRetirementFundUid; | ||
public MatchForCommencement() { | ||
} | ||
|
||
public void setPreviousRetirementFundUid(String previousRetirementFundUid) { | ||
this.previousRetirementFundUid = previousRetirementFundUid; | ||
} | ||
|
||
public LocalDate getCommencementDate() { | ||
return commencementDate; | ||
} | ||
|
||
public void setCommencementDate(LocalDate commencementDate) { | ||
this.commencementDate = commencementDate; | ||
} | ||
|
||
public LocalDate getTerminationDate() { | ||
return terminationDate; | ||
} | ||
|
||
public void setTerminationDate(LocalDate terminationDate) { | ||
this.terminationDate = terminationDate; | ||
public MatchForCommencement(String encryptedOasiNumber, String previousRetirementFundUid, String newRetirementFundUid, LocalDate commencementDate, LocalDate terminationDate) { | ||
super(encryptedOasiNumber, previousRetirementFundUid, newRetirementFundUid, commencementDate, terminationDate); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE) | ||
.append("encryptedOasiNumber", encryptedOasiNumber) | ||
.append("retirementFundUid", retirementFundUid) | ||
.append("previousRetirementFundUid", previousRetirementFundUid) | ||
.append("commencementDate", commencementDate) | ||
.append("terminationDate", terminationDate) | ||
.appendSuper(super.toString()) | ||
.toString(); | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) | ||
return true; | ||
if (o == null || getClass() != o.getClass()) | ||
return false; | ||
|
||
MatchForCommencement that = (MatchForCommencement) o; | ||
|
||
if (encryptedOasiNumber != null ? | ||
!encryptedOasiNumber.equals(that.encryptedOasiNumber) : | ||
that.encryptedOasiNumber != null) | ||
return false; | ||
if (retirementFundUid != null ? | ||
!retirementFundUid.equals(that.retirementFundUid) : | ||
that.retirementFundUid != null) | ||
return false; | ||
if (previousRetirementFundUid != null ? | ||
!previousRetirementFundUid.equals(that.previousRetirementFundUid) : | ||
that.previousRetirementFundUid != null) | ||
return false; | ||
if (commencementDate != null ? !commencementDate.equals(that.commencementDate) : that.commencementDate != null) | ||
return false; | ||
return terminationDate != null ? terminationDate.equals(that.terminationDate) : that.terminationDate == null; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
int result = encryptedOasiNumber != null ? encryptedOasiNumber.hashCode() : 0; | ||
result = 31 * result + (retirementFundUid != null ? retirementFundUid.hashCode() : 0); | ||
result = 31 * result + (previousRetirementFundUid != null ? previousRetirementFundUid.hashCode() : 0); | ||
result = 31 * result + (commencementDate != null ? commencementDate.hashCode() : 0); | ||
result = 31 * result + (terminationDate != null ? terminationDate.hashCode() : 0); | ||
return result; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.