From d4c3906331660985a534c55927f0ba059cec2b71 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 23 Jul 2017 18:35:28 +0200 Subject: [PATCH] Continued a bit: - renamed businessContactId to businessDataId - renamed exceptions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../jcontactsbusiness/BusinessBasicData.java | 4 ++-- .../jcontactsbusiness/CompanyBasicData.java | 16 ++++++++-------- ...va => BusinessDataAlreadyAddedException.java} | 8 ++++---- ...n.java => BusinessDataNotFoundException.java} | 8 ++++---- 4 files changed, 18 insertions(+), 18 deletions(-) rename src/org/mxchange/jcontactsbusiness/exceptions/{BusinessContactAlreadyAddedException.java => BusinessDataAlreadyAddedException.java} (83%) rename src/org/mxchange/jcontactsbusiness/exceptions/{BusinessContactNotFoundException.java => BusinessDataNotFoundException.java} (85%) diff --git a/src/org/mxchange/jcontactsbusiness/BusinessBasicData.java b/src/org/mxchange/jcontactsbusiness/BusinessBasicData.java index b90ed81..525d4e1 100644 --- a/src/org/mxchange/jcontactsbusiness/BusinessBasicData.java +++ b/src/org/mxchange/jcontactsbusiness/BusinessBasicData.java @@ -67,14 +67,14 @@ public interface BusinessBasicData extends Serializable { *

* @return Business contact id */ - Long getBusinessContactId (); + Long getBusinessDataId (); /** * Setter for business contact id *

* @param businessContactId Business contact id */ - void setBusinessContactId (final Long businessContactId); + void setBusinessDataId (final Long businessContactId); /** * Getter for company founder diff --git a/src/org/mxchange/jcontactsbusiness/CompanyBasicData.java b/src/org/mxchange/jcontactsbusiness/CompanyBasicData.java index e9eb0bf..a1fde41 100644 --- a/src/org/mxchange/jcontactsbusiness/CompanyBasicData.java +++ b/src/org/mxchange/jcontactsbusiness/CompanyBasicData.java @@ -73,9 +73,9 @@ public class CompanyBasicData implements BusinessBasicData { * Id number */ @Id - @Column (name = "business_contact_id", nullable = false, updatable = false) + @Column (name = "business_data_id", nullable = false, updatable = false) @GeneratedValue (strategy = GenerationType.IDENTITY) - private Long businessContactId; + private Long businessDataId; /** * Comments (any) @@ -183,7 +183,7 @@ public class CompanyBasicData implements BusinessBasicData { final BusinessBasicData other = (BusinessBasicData) object; - if (!Objects.equals(this.getBusinessContactId(), other.getBusinessContactId())) { + if (!Objects.equals(this.getBusinessDataId(), other.getBusinessDataId())) { return false; } else if (!Objects.equals(this.getCompanyName(), other.getCompanyName())) { return false; @@ -213,13 +213,13 @@ public class CompanyBasicData implements BusinessBasicData { } @Override - public Long getBusinessContactId () { - return this.businessContactId; + public Long getBusinessDataId () { + return this.businessDataId; } @Override - public void setBusinessContactId (final Long businessContactId) { - this.businessContactId = businessContactId; + public void setBusinessDataId (final Long businessDataId) { + this.businessDataId = businessDataId; } @Override @@ -368,7 +368,7 @@ public class CompanyBasicData implements BusinessBasicData { public int hashCode () { int hash = 3; - hash = 37 * hash + Objects.hashCode(this.getBusinessContactId()); + hash = 37 * hash + Objects.hashCode(this.getBusinessDataId()); hash = 37 * hash + Objects.hashCode(this.getCompanyName()); hash = 37 * hash + Objects.hashCode(this.getCompanyLegalStatus()); hash = 37 * hash + Objects.hashCode(this.getHeadQuartersData()); diff --git a/src/org/mxchange/jcontactsbusiness/exceptions/BusinessContactAlreadyAddedException.java b/src/org/mxchange/jcontactsbusiness/exceptions/BusinessDataAlreadyAddedException.java similarity index 83% rename from src/org/mxchange/jcontactsbusiness/exceptions/BusinessContactAlreadyAddedException.java rename to src/org/mxchange/jcontactsbusiness/exceptions/BusinessDataAlreadyAddedException.java index 620243e..2d99dd4 100644 --- a/src/org/mxchange/jcontactsbusiness/exceptions/BusinessContactAlreadyAddedException.java +++ b/src/org/mxchange/jcontactsbusiness/exceptions/BusinessDataAlreadyAddedException.java @@ -24,7 +24,7 @@ import org.mxchange.jcontactsbusiness.BusinessBasicData; *

* @author Roland Häder */ -public class BusinessContactAlreadyAddedException extends Exception { +public class BusinessDataAlreadyAddedException extends Exception { /** * Serial number @@ -36,14 +36,14 @@ public class BusinessContactAlreadyAddedException extends Exception { *

* @param businessContact Business contact that is already added */ - public BusinessContactAlreadyAddedException (final BusinessBasicData businessContact) { - super(MessageFormat.format("Business contact with businessContactId={0} not found.", businessContact.getBusinessContactId())); //NOI18N + public BusinessDataAlreadyAddedException (final BusinessBasicData businessContact) { + super(MessageFormat.format("Business contact with businessContactId={0} not found.", businessContact.getBusinessDataId())); //NOI18N } /** * Default constructor, may be used if no contact instance is available */ - public BusinessContactAlreadyAddedException () { + public BusinessDataAlreadyAddedException () { super("BusinessContact already added"); //NOI18N } diff --git a/src/org/mxchange/jcontactsbusiness/exceptions/BusinessContactNotFoundException.java b/src/org/mxchange/jcontactsbusiness/exceptions/BusinessDataNotFoundException.java similarity index 85% rename from src/org/mxchange/jcontactsbusiness/exceptions/BusinessContactNotFoundException.java rename to src/org/mxchange/jcontactsbusiness/exceptions/BusinessDataNotFoundException.java index 6368041..918db2f 100644 --- a/src/org/mxchange/jcontactsbusiness/exceptions/BusinessContactNotFoundException.java +++ b/src/org/mxchange/jcontactsbusiness/exceptions/BusinessDataNotFoundException.java @@ -23,7 +23,7 @@ import java.text.MessageFormat; *

* @author Roland Häder */ -public class BusinessContactNotFoundException extends Exception { +public class BusinessDataNotFoundException extends Exception { /** * Serial number @@ -35,7 +35,7 @@ public class BusinessContactNotFoundException extends Exception { *

* @param businessContactId Business contact id */ - public BusinessContactNotFoundException (final Long businessContactId) { + public BusinessDataNotFoundException (final Long businessContactId) { // Call super constructor with message and cause super(MessageFormat.format("Business contact with id {0} was not found.", businessContactId)); //NOI18N } @@ -46,7 +46,7 @@ public class BusinessContactNotFoundException extends Exception { * @param businessContactId Business contact id * @param cause Causing exception */ - public BusinessContactNotFoundException (final Long businessContactId, final Throwable cause) { + public BusinessDataNotFoundException (final Long businessContactId, final Throwable cause) { // Call super constructor with message and cause super(MessageFormat.format("Business contact with id {0} was not found.", businessContactId), cause); //NOI18N } @@ -57,7 +57,7 @@ public class BusinessContactNotFoundException extends Exception { * @param emailAddress Email address * @param cause Causing exception */ - public BusinessContactNotFoundException (final String emailAddress, final Throwable cause) { + public BusinessDataNotFoundException (final String emailAddress, final Throwable cause) { // Call super constructor with message and cause super(MessageFormat.format("Business contact with email address {0} was not found.", emailAddress), cause); //NOI18N } -- 2.39.5