]> git.mxchange.org Git - juser-core.git/commitdiff
added constructor with all fields and only a few. The later one is good for new chang...
authorRoland Haeder <roland@mxchange.org>
Sat, 12 Mar 2016 19:02:00 +0000 (20:02 +0100)
committerRoland Haeder <roland@mxchange.org>
Sat, 12 Mar 2016 19:02:00 +0000 (20:02 +0100)
src/org/mxchange/jusercore/model/email_address/EmailAddressChange.java

index 492739ad47387169c04cff0decb0595db8b5214a..e2b5086075fe9c56f4874ed02c51aa833a33ea97 100644 (file)
@@ -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
         * <p>
+        * @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
+        * <p>
+        * @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