From: Roland Haeder Date: Sat, 12 Mar 2016 19:02:00 +0000 (+0100) Subject: added constructor with all fields and only a few. The later one is good for new chang... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2c51a51332fbe16eb13636f773889498d325a8e5;p=juser-core.git added constructor with all fields and only a few. The later one is good for new change entries --- diff --git a/src/org/mxchange/jusercore/model/email_address/EmailAddressChange.java b/src/org/mxchange/jusercore/model/email_address/EmailAddressChange.java index 492739a..e2b5086 100644 --- a/src/org/mxchange/jusercore/model/email_address/EmailAddressChange.java +++ b/src/org/mxchange/jusercore/model/email_address/EmailAddressChange.java @@ -120,20 +120,41 @@ public class EmailAddressChange implements ChangeableEmailAddress { } /** - * Constructor with user, email address and creation timestamp to set + * Constructor with all fields to set *

+ * @param emailChangeId Email change id * @param user User instance - * @param emailAddress Email address to queue + * @param emailAddress Email address * @param emailChangeCreated Timestamp for creation + * @param emailChangeStatus Email change status + * @param emailChangeDone When this entry has been done + * @param emailChangeHash Email change hash */ - public EmailAddressChange (final User user, final String emailAddress, final Calendar emailChangeCreated) { - // Call super constructor + public EmailAddressChange (final Long emailChangeId, final User user, final String emailAddress, final Calendar emailChangeCreated, final EmailChangeStatus emailChangeStatus, final Calendar emailChangeDone, final String emailChangeHash) { + // Call other constructor + this(user, emailAddress); + + // Set remaining + this.emailChangeId = emailChangeId; + this.emailChangeCreated = emailChangeCreated; + this.emailChangeStatus = emailChangeStatus; + this.emailChangeDone = emailChangeDone; + this.emailChangeHash = emailChangeHash; + } + + /** + * Constructor with user and email address + *

+ * @param user User instance + * @param emailAddress Email address + */ + public EmailAddressChange (final User user, final String emailAddress) { + // Call other constructor this(); // Set all - this.emailAddress = emailAddress; this.emailChangeUser = user; - this.emailChangeCreated = emailChangeCreated; + this.emailAddress = emailAddress; } @Override