From ceebe9da3c570da780b54993778a8a16ca83af67 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= <roland@mxchange.org> Date: Sun, 23 Jul 2017 13:38:27 +0200 Subject: [PATCH] owner is already given in "super-entity" BusinessContact, which may need renaming because it is not a contact, but an abstract business entity where all data of that (entire) business is attached to, like employees, branch offices and so on. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder <roland@mxchange.org> --- .../jcontactsbusiness/CompanyContact.java | 1 + .../basicdata/BusinessBasicData.java | 16 +------------- .../basicdata/CompanyBasicData.java | 22 ------------------- 3 files changed, 2 insertions(+), 37 deletions(-) diff --git a/src/org/mxchange/jcontactsbusiness/CompanyContact.java b/src/org/mxchange/jcontactsbusiness/CompanyContact.java index ec4bc12..1c38b86 100644 --- a/src/org/mxchange/jcontactsbusiness/CompanyContact.java +++ b/src/org/mxchange/jcontactsbusiness/CompanyContact.java @@ -236,4 +236,5 @@ public class CompanyContact implements BusinessContact { return hash; } + } diff --git a/src/org/mxchange/jcontactsbusiness/basicdata/BusinessBasicData.java b/src/org/mxchange/jcontactsbusiness/basicdata/BusinessBasicData.java index e03df62..29a041a 100644 --- a/src/org/mxchange/jcontactsbusiness/basicdata/BusinessBasicData.java +++ b/src/org/mxchange/jcontactsbusiness/basicdata/BusinessBasicData.java @@ -21,7 +21,6 @@ import java.util.Calendar; import org.mxchange.jcontactsbusiness.logo.BusinessLogo; import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; -import org.mxchange.jusercore.model.user.User; /** * A POJI for basic business data @@ -170,20 +169,6 @@ public interface BusinessBasicData extends Serializable { */ void setCompanyWebsiteUrl (final String companyWebsiteUrl); - /** - * Getter for user owner instance - * <p> - * @return User owner instance - */ - User getCompanyBasicUserOwner (); - - /** - * Setter for user owner instance - * <p> - * @param companyBasicUserOwner User owner instance - */ - void setCompanyBasicUserOwner (final User companyBasicUserOwner); - /** * Getter for timestamp when this entry has been created * <p> @@ -203,4 +188,5 @@ public interface BusinessBasicData extends Serializable { @Override int hashCode (); + } diff --git a/src/org/mxchange/jcontactsbusiness/basicdata/CompanyBasicData.java b/src/org/mxchange/jcontactsbusiness/basicdata/CompanyBasicData.java index c578795..8918906 100644 --- a/src/org/mxchange/jcontactsbusiness/basicdata/CompanyBasicData.java +++ b/src/org/mxchange/jcontactsbusiness/basicdata/CompanyBasicData.java @@ -38,8 +38,6 @@ import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; import org.mxchange.jphone.phonenumbers.fax.FaxNumber; import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; import org.mxchange.jphone.phonenumbers.landline.LandLineNumber; -import org.mxchange.jusercore.model.user.LoginUser; -import org.mxchange.jusercore.model.user.User; /** * A POJO for basic company data @@ -73,13 +71,6 @@ public class CompanyBasicData implements BusinessBasicData { @GeneratedValue (strategy = GenerationType.IDENTITY) private Long companyBasicId; - /** - * User owner instance - */ - @JoinColumn (name = "company_user_id", nullable = false, updatable = false) - @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.REFRESH, optional = false) - private User companyBasicUserOwner; - /** * Comments (any) */ @@ -158,8 +149,6 @@ public class CompanyBasicData implements BusinessBasicData { return false; } else if (!Objects.equals(this.getCompanyTaxNumber(), other.getCompanyTaxNumber())) { return false; - } else if (!Objects.equals(this.getCompanyBasicUserOwner(), other.getCompanyBasicUserOwner())) { - return false; } return true; @@ -187,16 +176,6 @@ public class CompanyBasicData implements BusinessBasicData { this.companyBasicId = companyBasicId; } - @Override - public User getCompanyBasicUserOwner () { - return this.companyBasicUserOwner; - } - - @Override - public void setCompanyBasicUserOwner (final User companyBasicUserOwner) { - this.companyBasicUserOwner = companyBasicUserOwner; - } - @Override public String getCompanyComments () { return this.companyComments; @@ -295,7 +274,6 @@ public class CompanyBasicData implements BusinessBasicData { hash = 53 * hash + Objects.hashCode(this.getCompanyLegalStatus()); hash = 53 * hash + Objects.hashCode(this.getCompanyName()); hash = 53 * hash + Objects.hashCode(this.getCompanyTaxNumber()); - hash = 53 * hash + Objects.hashCode(this.getCompanyBasicUserOwner()); return hash; } -- 2.39.5