]> git.mxchange.org Git - jcontacts-business-core.git/commitdiff
Continued a bit:
authorRoland Häder <roland@mxchange.org>
Sun, 23 Jul 2017 16:35:28 +0000 (18:35 +0200)
committerRoland Häder <roland@mxchange.org>
Sun, 23 Jul 2017 16:35:28 +0000 (18:35 +0200)
- renamed businessContactId to businessDataId
- renamed exceptions

Signed-off-by: Roland Häder <roland@mxchange.org>
src/org/mxchange/jcontactsbusiness/BusinessBasicData.java
src/org/mxchange/jcontactsbusiness/CompanyBasicData.java
src/org/mxchange/jcontactsbusiness/exceptions/BusinessContactAlreadyAddedException.java [deleted file]
src/org/mxchange/jcontactsbusiness/exceptions/BusinessContactNotFoundException.java [deleted file]
src/org/mxchange/jcontactsbusiness/exceptions/BusinessDataAlreadyAddedException.java [new file with mode: 0644]
src/org/mxchange/jcontactsbusiness/exceptions/BusinessDataNotFoundException.java [new file with mode: 0644]

index b90ed81149d97cc5a0d6d64ed640ed2548908c07..525d4e12f34d883b52e13b362e5b09169e6ac0a7 100644 (file)
@@ -67,14 +67,14 @@ public interface BusinessBasicData extends Serializable {
         * <p>
         * @return Business contact id
         */
-       Long getBusinessContactId ();
+       Long getBusinessDataId ();
 
        /**
         * Setter for business contact id
         * <p>
         * @param businessContactId Business contact id
         */
-       void setBusinessContactId (final Long businessContactId);
+       void setBusinessDataId (final Long businessContactId);
 
        /**
         * Getter for company founder
index e9eb0bf467e349fabf24418d491767b1059f549e..a1fde417962f0b1c8fbd9c221c8d6bd5c01b1932 100644 (file)
@@ -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/BusinessContactAlreadyAddedException.java
deleted file mode 100644 (file)
index 620243e..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2016, 2017 Roland Häder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jcontactsbusiness.exceptions;
-
-import java.text.MessageFormat;
-import org.mxchange.jcontactsbusiness.BusinessBasicData;
-
-/**
- * Thrown if the given BusinessBasicData instance is already added
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public class BusinessContactAlreadyAddedException extends Exception {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 75_844_851_467L;
-
-       /**
-        * Constructor with a Contact instance
-        * <p>
-        * @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
-       }
-
-       /**
-        * Default constructor, may be used if no contact instance is available
-        */
-       public BusinessContactAlreadyAddedException () {
-               super("BusinessContact already added"); //NOI18N
-       }
-
-}
diff --git a/src/org/mxchange/jcontactsbusiness/exceptions/BusinessContactNotFoundException.java b/src/org/mxchange/jcontactsbusiness/exceptions/BusinessContactNotFoundException.java
deleted file mode 100644 (file)
index 6368041..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2016, 2017 Roland Häder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jcontactsbusiness.exceptions;
-
-import java.text.MessageFormat;
-
-/**
- * An exception thrown when a contact (entity) has not found.
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public class BusinessContactNotFoundException extends Exception {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 23_759_801_876_416_568L;
-
-       /**
-        * Constructor with business contact id
-        * <p>
-        * @param businessContactId Business contact id
-        */
-       public BusinessContactNotFoundException (final Long businessContactId) {
-               // Call super constructor with message and cause
-               super(MessageFormat.format("Business contact with id {0} was not found.", businessContactId)); //NOI18N
-       }
-
-       /**
-        * Constructor with business contact id and causing exception
-        * <p>
-        * @param businessContactId Business contact id
-        * @param cause Causing exception
-        */
-       public BusinessContactNotFoundException (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
-       }
-
-       /**
-        * Constructor with email address and causing exception
-        * <p>
-        * @param emailAddress Email address
-        * @param cause Causing exception
-        */
-       public BusinessContactNotFoundException (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
-       }
-
-}
diff --git a/src/org/mxchange/jcontactsbusiness/exceptions/BusinessDataAlreadyAddedException.java b/src/org/mxchange/jcontactsbusiness/exceptions/BusinessDataAlreadyAddedException.java
new file mode 100644 (file)
index 0000000..2d99dd4
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2016, 2017 Roland Häder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jcontactsbusiness.exceptions;
+
+import java.text.MessageFormat;
+import org.mxchange.jcontactsbusiness.BusinessBasicData;
+
+/**
+ * Thrown if the given BusinessBasicData instance is already added
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public class BusinessDataAlreadyAddedException extends Exception {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 75_844_851_467L;
+
+       /**
+        * Constructor with a Contact instance
+        * <p>
+        * @param businessContact Business contact that is already added
+        */
+       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 BusinessDataAlreadyAddedException () {
+               super("BusinessContact already added"); //NOI18N
+       }
+
+}
diff --git a/src/org/mxchange/jcontactsbusiness/exceptions/BusinessDataNotFoundException.java b/src/org/mxchange/jcontactsbusiness/exceptions/BusinessDataNotFoundException.java
new file mode 100644 (file)
index 0000000..918db2f
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2016, 2017 Roland Häder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jcontactsbusiness.exceptions;
+
+import java.text.MessageFormat;
+
+/**
+ * An exception thrown when a contact (entity) has not found.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public class BusinessDataNotFoundException extends Exception {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 23_759_801_876_416_568L;
+
+       /**
+        * Constructor with business contact id
+        * <p>
+        * @param businessContactId Business contact id
+        */
+       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
+       }
+
+       /**
+        * Constructor with business contact id and causing exception
+        * <p>
+        * @param businessContactId Business contact id
+        * @param cause Causing exception
+        */
+       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
+       }
+
+       /**
+        * Constructor with email address and causing exception
+        * <p>
+        * @param emailAddress Email address
+        * @param cause Causing exception
+        */
+       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
+       }
+
+}