]> git.mxchange.org Git - jaddressbook-lib.git/commitdiff
Don't let the model set its own properties (to much) as this removes flexibility.
authorRoland Haeder <roland@mxchange.org>
Mon, 18 Apr 2016 18:11:14 +0000 (20:11 +0200)
committerRoland Haeder <roland@mxchange.org>
Mon, 18 Apr 2016 18:11:14 +0000 (20:11 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
src/org/mxchange/addressbook/model/addressbook/UserAddressbook.java
src/org/mxchange/addressbook/model/addressbook/shared/AddressbookShare.java

index 0606f3c2273dbdecda1d73b8e1a822a4967d62ff..ce02a368e7baab00b213bc10d385d10e3fe3cefa 100644 (file)
@@ -115,18 +115,16 @@ public class UserAddressbook implements Addressbook {
        /**
         * Public constructor with address book name
         * <p>
-        * @param addressbookName    Address book name
-        * @param addressbookUser    User instance
-        * @param addressbookCreated When this entry has been created
+        * @param addressbookName Address book name
+        * @param addressbookUser User instance
         */
-       public UserAddressbook (final String addressbookName, final User addressbookUser, final Calendar addressbookCreated) {
+       public UserAddressbook (final String addressbookName, final User addressbookUser) {
                // Call default constructor
                this();
 
-               // Set name, user instance and creation timestamp
+               // Set name, user instance
                this.addressbookName = addressbookName;
                this.addressbookUser = addressbookUser;
-               this.addressbookCreated = addressbookCreated;
        }
 
        /**
index ac6c8bbe5188fbc3fa1aa5abeb92f8c6f9855386..13dc9e41a9458c893f791277f6eeea9d80fd1ee8 100644 (file)
@@ -18,7 +18,6 @@ package org.mxchange.addressbook.model.addressbook.shared;
 
 import java.text.MessageFormat;
 import java.util.Calendar;
-import java.util.GregorianCalendar;
 import java.util.Objects;
 import javax.persistence.Basic;
 import javax.persistence.CascadeType;
@@ -102,6 +101,12 @@ public class AddressbookShare implements ShareableAddressbook {
        @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.REFRESH, optional = false)
        private User shareUserSharee;
 
+       /**
+        * Default constructor
+        */
+       public AddressbookShare () {
+       }
+
        /**
         * Constructor with address book and sharee instance. Both parameters must
         * not be null, their id numbers must be set and the adress book's user
@@ -142,13 +147,6 @@ public class AddressbookShare implements ShareableAddressbook {
                this.shareAddressbook = addressbook;
                this.shareUserOwner = addressbook.getAddressbookUser();
                this.shareUserSharee = sharee;
-               this.shareCreated = new GregorianCalendar();
-       }
-
-       /**
-        * Default constructor
-        */
-       public AddressbookShare () {
        }
 
        @Override