]> git.mxchange.org Git - jcontacts-business-core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sun, 5 Nov 2017 11:31:43 +0000 (12:31 +0100)
committerRoland Häder <roland@mxchange.org>
Sun, 5 Nov 2017 11:54:03 +0000 (12:54 +0100)
- added branch office's last house number
- added headquarter's last house number

Signed-off-by: Roland Häder <roland@mxchange.org>
src/org/mxchange/jcontactsbusiness/model/branchoffice/BranchOffice.java
src/org/mxchange/jcontactsbusiness/model/branchoffice/BusinessBranchOffice.java
src/org/mxchange/jcontactsbusiness/model/headquarter/BusinessHeadquarter.java
src/org/mxchange/jcontactsbusiness/model/headquarter/Headquarter.java

index 9f9fa146dae93ad979cb971640cc57236a14c903..77a3ae8edef383eae3a866fcc953c77e5626e978 100644 (file)
@@ -90,6 +90,20 @@ public interface BranchOffice extends Serializable {
         */
        void setBranchHouseNumber (final Short branchHouseNumber);
 
+       /**
+        * Getter for branch office's last house number
+        * <p>
+        * @return Branch office's last house number
+        */
+       Short getBranchLastHouseNumber ();
+
+       /**
+        * Setter for branch office's last house number
+        * <p>
+        * @param branchLastHouseNumber Branch office's last house number
+        */
+       void setBranchLastHouseNumber (final Short branchLastHouseNumber);
+
        /**
         * Getter for branch office's phone number
         * <p>
index a24b326a8e4e9e21a222ca3237862665d15c3f2e..604355f631065750bbd7bfd7366ae78fa59cb223 100644 (file)
@@ -61,7 +61,7 @@ import org.mxchange.jusercore.model.user.User;
 @Table (name = "company_branch_offices")
 @NamedQueries (
                {
-                       @NamedQuery (name = "AllBranchOffices", query = "SELECT bo FROM company_branch_offices AS bo ORDER BY bo.branchId ASC"),
+                       @NamedQuery (name = "AllBranchOffices", query = "SELECT bo FROM company_branch_offices AS bo ORDER BY bo.branchId ASC")
                }
 )
 @SuppressWarnings ("PersistenceUnitPresent")
@@ -126,7 +126,7 @@ public class BusinessBranchOffice implements BranchOffice {
         * Branch office's house number
         */
        @Basic (optional = false)
-       @Column (name = "branch_house_number", length = 3, nullable = false)
+       @Column (name = "branch_house_number", nullable = false)
        private Short branchHouseNumber;
 
        /**
@@ -144,6 +144,12 @@ public class BusinessBranchOffice implements BranchOffice {
        @OneToOne (targetEntity = LandLineNumber.class, cascade = CascadeType.ALL)
        private DialableLandLineNumber branchLandLineNumber;
 
+       /**
+        * Branch office's last house number
+        */
+       @Column (name = "branch_last_house_number")
+       private Short branchLastHouseNumber;
+
        /**
         * Numer of this branch office
         */
@@ -169,7 +175,7 @@ public class BusinessBranchOffice implements BranchOffice {
        /**
         * Branch office's store (if multiple-store building)
         */
-       @Column (name = "branch_store", length = 3)
+       @Column (name = "branch_store")
        private Short branchStore;
 
        /**
@@ -182,7 +188,7 @@ public class BusinessBranchOffice implements BranchOffice {
        /**
         * Branch office's suite number (if applyable)
         */
-       @Column (name = "branch_suite_number", length = 4)
+       @Column (name = "branch_suite_number")
        private Short branchSuiteNumber;
 
        /**
@@ -196,7 +202,7 @@ public class BusinessBranchOffice implements BranchOffice {
         * Branch office's ZIP code
         */
        @Basic (optional = false)
-       @Column (name = "branch_zip_code", length = 6, nullable = false)
+       @Column (name = "branch_zip_code", nullable = false)
        private Integer branchZipCode;
 
        /**
@@ -409,6 +415,16 @@ public class BusinessBranchOffice implements BranchOffice {
                this.branchLandLineNumber = branchLandLineNumber;
        }
 
+       @Override
+       public Short getBranchLastHouseNumber () {
+               return this.branchLastHouseNumber;
+       }
+
+       @Override
+       public void setBranchLastHouseNumber (final Short branchLastHouseNumber) {
+               this.branchLastHouseNumber = branchLastHouseNumber;
+       }
+
        @Override
        public Long getBranchNumber () {
                return this.branchNumber;
index 4baeeaa5c87b85fe06b12645747a52904a47b6cc..9cfe846497f532b3fab6c71eab7644aca0bcaee3 100644 (file)
@@ -135,6 +135,12 @@ public class BusinessHeadquarter implements Headquarter {
        @OneToOne (targetEntity = LandLineNumber.class, cascade = CascadeType.ALL)
        private DialableLandLineNumber headquarterLandLineNumber;
 
+       /**
+        * Headquarter's last house number
+        */
+       @Column (name = "headquarter_last_house_number")
+       private Short headquarterLastHouseNumber;
+
        /**
         * Opening times for this branch office
         */
@@ -181,6 +187,15 @@ public class BusinessHeadquarter implements Headquarter {
        public BusinessHeadquarter () {
        }
 
+       /**
+        * Constructor with all required fields
+        * <p>
+        * @param headquarterCity        City
+        * @param headquarterCountry     Country
+        * @param headquarterStreet      Street name
+        * @param headquarterZipCode     ZIP code
+        * @param headquarterHouseNumber House number
+        */
        public BusinessHeadquarter (final String headquarterCity, final Country headquarterCountry, final String headquarterStreet, final Integer headquarterZipCode, final Short headquarterHouseNumber) {
                // Call other constructor first
                this();
@@ -247,6 +262,8 @@ public class BusinessHeadquarter implements Headquarter {
                        return false;
                } else if (!Objects.equals(this.getHeadquarterHouseNumber(), headquarter.getHeadquarterHouseNumber())) {
                        return false;
+               } else if (!Objects.equals(this.getHeadquarterLastHouseNumber(), headquarter.getHeadquarterLastHouseNumber())) {
+                       return false;
                } else if (!Objects.equals(this.getHeadquarterStore(), headquarter.getHeadquarterStore())) {
                        return false;
                } else if (!Objects.equals(this.getHeadquarterStreet(), headquarter.getHeadquarterStreet())) {
@@ -352,6 +369,16 @@ public class BusinessHeadquarter implements Headquarter {
                this.headquarterLandLineNumber = headquarterLandLineNumber;
        }
 
+       @Override
+       public Short getHeadquarterLastHouseNumber () {
+               return this.headquarterLastHouseNumber;
+       }
+
+       @Override
+       public void setHeadquarterLastHouseNumber (final Short headquarterLastHouseNumber) {
+               this.headquarterLastHouseNumber = headquarterLastHouseNumber;
+       }
+
        @Override
        @SuppressWarnings ("ReturnOfCollectionOrArrayField")
        public List<OpeningTime> getHeadquarterOpeningTimes () {
@@ -422,6 +449,7 @@ public class BusinessHeadquarter implements Headquarter {
                hash = 47 * hash + Objects.hashCode(this.getHeadquarterCity());
                hash = 47 * hash + Objects.hashCode(this.getHeadquarterCountry());
                hash = 47 * hash + Objects.hashCode(this.getHeadquarterHouseNumber());
+               hash = 47 * hash + Objects.hashCode(this.getHeadquarterLastHouseNumber());
                hash = 47 * hash + Objects.hashCode(this.getHeadquarterStore());
                hash = 47 * hash + Objects.hashCode(this.getHeadquarterStreet());
                hash = 47 * hash + Objects.hashCode(this.getHeadquarterSuiteNumber());
index cc76d59fbfcaf969c872bb3008295966bcaaa93d..4db8fa52f5deea4ee0ff40179d5b79fe3ffcf8aa 100644 (file)
@@ -34,142 +34,156 @@ import org.mxchange.jusercore.model.user.User;
 public interface Headquarter extends Serializable {
 
        /**
-        * Getter for headquarter' city name
+        * Getter for headquarter's city name
         * <p>
-        * @return Headquarter' city name
+        * @return Headquarter's city name
         */
        String getHeadquarterCity ();
 
        /**
-        * Setter for headquarter' city name
+        * Setter for headquarter's city name
         * <p>
-        * @param headquarterCity Headquarter' city name
+        * @param headquarterCity Headquarter's city name
         */
        void setHeadquarterCity (final String headquarterCity);
 
        /**
-        * Getter for headquarter' country code
+        * Getter for headquarter's country code
         * <p>
-        * @return Headquarter' country code
+        * @return Headquarter's country code
         */
        Country getHeadquarterCountry ();
 
        /**
-        * Setter for headquarter' country code
+        * Setter for headquarter's country code
         * <p>
-        * @param headquarterCountryCode Headquarter' country code
+        * @param headquarterCountryCode Headquarter's country code
         */
        void setHeadquarterCountry (final Country headquarterCountryCode);
 
        /**
-        * Getter for headquarter' house number
+        * Getter for headquarter's house number
         * <p>
-        * @return Headquarter' house number
+        * @return Headquarter's house number
         */
        Short getHeadquarterHouseNumber ();
 
        /**
-        * Setter for headquarter' house number
+        * Setter for headquarter's house number
         * <p>
-        * @param headquarterHouseNumber Headquarter' house number
+        * @param headquarterHouseNumber Headquarter's house number
         */
        void setHeadquarterHouseNumber (final Short headquarterHouseNumber);
 
        /**
-        * Getter for headquarter' id number
+        * Getter for headquarter's last house number
         * <p>
-        * @return Headquarter' id number
+        * @return Headquarter's last house number
+        */
+       Short getHeadquarterLastHouseNumber ();
+
+       /**
+        * Setter for headquarter's last house number
+        * <p>
+        * @param headquarterLastHouseNumber Headquarter's last house number
+        */
+       void setHeadquarterLastHouseNumber (final Short headquarterLastHouseNumber);
+
+       /**
+        * Getter for headquarter's id number
+        * <p>
+        * @return Headquarter's id number
         */
        Long getHeadquarterId ();
 
        /**
-        * Setter for headquarter' id number
+        * Setter for headquarter's id number
         * <p>
-        * @param headquarterId Headquarter' id number
+        * @param headquarterId Headquarter's id number
         */
        void setHeadquarterId (final Long headquarterId);
 
        /**
-        * Getter for headquarter' store number
+        * Getter for headquarter's store number
         * <p>
-        * @return Headquarter' store number
+        * @return Headquarter's store number
         */
        Short getHeadquarterStore ();
 
        /**
-        * Setter for headquarter' store number
+        * Setter for headquarter's store number
         * <p>
-        * @param headquarterStore Headquarter' store number
+        * @param headquarterStore Headquarter's store number
         */
        void setHeadquarterStore (final Short headquarterStore);
 
        /**
-        * Getter for headquarter' street name
+        * Getter for headquarter's street name
         * <p>
-        * @return Headquarter' street name
+        * @return Headquarter's street name
         */
        String getHeadquarterStreet ();
 
        /**
-        * Setter for headquarter' street name
+        * Setter for headquarter's street name
         * <p>
-        * @param headquarterStreet Headquarter' street name
+        * @param headquarterStreet Headquarter's street name
         */
        void setHeadquarterStreet (final String headquarterStreet);
 
        /**
-        * Getter for headquarter' suite number
+        * Getter for headquarter's suite number
         * <p>
-        * @return Headquarter' suite number
+        * @return Headquarter's suite number
         */
        Short getHeadquarterSuiteNumber ();
 
        /**
-        * Setter for headquarter' suite number
+        * Setter for headquarter's suite number
         * <p>
-        * @param headquarterSuiteNumber Headquarter' suite number
+        * @param headquarterSuiteNumber Headquarter's suite number
         */
        void setHeadquarterSuiteNumber (final Short headquarterSuiteNumber);
 
        /**
-        * Getter for headquarter' ZIP code
+        * Getter for headquarter's ZIP code
         * <p>
-        * @return Headquarter' ZIP code
+        * @return Headquarter's ZIP code
         */
        Integer getHeadquarterZipCode ();
 
        /**
-        * Setter for headquarter' ZIP code
+        * Setter for headquarter's ZIP code
         * <p>
-        * @param headquarterZipCode Headquarter' ZIP code
+        * @param headquarterZipCode Headquarter's ZIP code
         */
        void setHeadquarterZipCode (final Integer headquarterZipCode);
 
        /**
-        * Getter for headquarter' land-line number
+        * Getter for headquarter's land-line number
         * <p>
-        * @return Headquarter' land-line number
+        * @return Headquarter's land-line number
         */
        DialableLandLineNumber getHeadquarterLandLineNumber ();
 
        /**
-        * Setter for headquarter' land-line number
+        * Setter for headquarter's land-line number
         * <p>
-        * @param headquarterLandLineNumber Headquarter' land-line number
+        * @param headquarterLandLineNumber Headquarter's land-line number
         */
        void setHeadquarterLandLineNumber (final DialableLandLineNumber headquarterLandLineNumber);
 
        /**
-        * Getter for headquarter' fax number
+        * Getter for headquarter's fax number
         * <p>
-        * @return Headquarter' fax number
+        * @return Headquarter's fax number
         */
        DialableFaxNumber getHeadquarterFaxNumber ();
 
        /**
-        * Setter for headquarter' fax number
+        * Setter for headquarter's fax number
         * <p>
-        * @param headquarterFaxNumber Headquarter' fax number
+        * @param headquarterFaxNumber Headquarter's fax number
         */
        void setHeadquarterFaxNumber (final DialableFaxNumber headquarterFaxNumber);
 
@@ -216,16 +230,16 @@ public interface Headquarter extends Serializable {
        void setHeadquarterOpeningTimes (final List<OpeningTime> branchOpeningTimes);
 
        /**
-        * Getter for headquarter' email address
+        * Getter for headquarter's email address
         * <p>
-        * @return Headquarter' email address
+        * @return Headquarter's email address
         */
        String getHeadquarterEmailAddress ();
 
        /**
-        * Setter for headquarter' email address
+        * Setter for headquarter's email address
         * <p>
-        * @param headquarterEmailAddress Headquarter' email address
+        * @param headquarterEmailAddress Headquarter's email address
         */
        void setHeadquarterEmailAddress (final String headquarterEmailAddress);