From: Roland Haeder Date: Mon, 18 Apr 2016 18:11:14 +0000 (+0200) Subject: Don't let the model set its own properties (to much) as this removes flexibility. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c22815d8af920878de5446297a5278091f7a631d;p=addressbook-lib.git Don't let the model set its own properties (to much) as this removes flexibility. Signed-off-by: Roland Häder --- diff --git a/src/org/mxchange/addressbook/model/addressbook/UserAddressbook.java b/src/org/mxchange/addressbook/model/addressbook/UserAddressbook.java index 0606f3c..ce02a36 100644 --- a/src/org/mxchange/addressbook/model/addressbook/UserAddressbook.java +++ b/src/org/mxchange/addressbook/model/addressbook/UserAddressbook.java @@ -115,18 +115,16 @@ public class UserAddressbook implements Addressbook { /** * Public constructor with address book name *

- * @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; } /** diff --git a/src/org/mxchange/addressbook/model/addressbook/shared/AddressbookShare.java b/src/org/mxchange/addressbook/model/addressbook/shared/AddressbookShare.java index ac6c8bb..13dc9e4 100644 --- a/src/org/mxchange/addressbook/model/addressbook/shared/AddressbookShare.java +++ b/src/org/mxchange/addressbook/model/addressbook/shared/AddressbookShare.java @@ -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