From b73e9fa27a2bca0fa53fad806dba3065b15e9c90 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 8 Mar 2016 22:09:40 +0100 Subject: [PATCH] introduced copyAll() methods for all 3 kinds. These methods will help later in EJBs to easily update all fields for em.merge() call. --- .../mxchange/jphone/phonenumbers/DialableNumber.java | 2 +- .../jphone/phonenumbers/cellphone/CellphoneNumber.java | 9 +++++++++ .../cellphone/DialableCellphoneNumber.java | 7 +++++++ .../jphone/phonenumbers/fax/DialableFaxNumber.java | 7 +++++++ .../mxchange/jphone/phonenumbers/fax/FaxNumber.java | 10 ++++++++++ .../phonenumbers/landline/DialableLandLineNumber.java | 7 +++++++ .../jphone/phonenumbers/landline/LandLineNumber.java | 10 ++++++++++ 7 files changed, 51 insertions(+), 1 deletion(-) diff --git a/src/org/mxchange/jphone/phonenumbers/DialableNumber.java b/src/org/mxchange/jphone/phonenumbers/DialableNumber.java index e1da0c5..5996101 100644 --- a/src/org/mxchange/jphone/phonenumbers/DialableNumber.java +++ b/src/org/mxchange/jphone/phonenumbers/DialableNumber.java @@ -21,7 +21,7 @@ import java.util.Calendar; import org.mxchange.jcountry.data.Country; /** - * A POJO for dialable numbers + * A POJI for dial-able numbers *

* @author Roland Haeder */ diff --git a/src/org/mxchange/jphone/phonenumbers/cellphone/CellphoneNumber.java b/src/org/mxchange/jphone/phonenumbers/cellphone/CellphoneNumber.java index d4a191e..b69c4da 100644 --- a/src/org/mxchange/jphone/phonenumbers/cellphone/CellphoneNumber.java +++ b/src/org/mxchange/jphone/phonenumbers/cellphone/CellphoneNumber.java @@ -106,6 +106,15 @@ public class CellphoneNumber implements DialableCellphoneNumber, Comparable + * @param sourceNumber Source number object + */ + void copyAll (final DialableCellphoneNumber sourceNumber); + @Override boolean equals (final Object object); diff --git a/src/org/mxchange/jphone/phonenumbers/fax/DialableFaxNumber.java b/src/org/mxchange/jphone/phonenumbers/fax/DialableFaxNumber.java index 391094a..14e5155 100644 --- a/src/org/mxchange/jphone/phonenumbers/fax/DialableFaxNumber.java +++ b/src/org/mxchange/jphone/phonenumbers/fax/DialableFaxNumber.java @@ -25,6 +25,13 @@ import org.mxchange.jphone.phonenumbers.DialableNumber; */ public interface DialableFaxNumber extends DialableNumber { + /** + * Copy all fields from source object to this + *

+ * @param sourceNumber Source number object + */ + void copyAll (final DialableFaxNumber sourceNumber); + @Override boolean equals (final Object object); diff --git a/src/org/mxchange/jphone/phonenumbers/fax/FaxNumber.java b/src/org/mxchange/jphone/phonenumbers/fax/FaxNumber.java index 9fd4b39..2beb7bd 100644 --- a/src/org/mxchange/jphone/phonenumbers/fax/FaxNumber.java +++ b/src/org/mxchange/jphone/phonenumbers/fax/FaxNumber.java @@ -114,6 +114,16 @@ public class FaxNumber implements DialableFaxNumber, Comparable + * @param sourceNumber Source number object + */ + void copyAll (final DialableLandLineNumber sourceNumber); + @Override boolean equals (final Object object); diff --git a/src/org/mxchange/jphone/phonenumbers/landline/LandLineNumber.java b/src/org/mxchange/jphone/phonenumbers/landline/LandLineNumber.java index dbc61f9..44a373c 100644 --- a/src/org/mxchange/jphone/phonenumbers/landline/LandLineNumber.java +++ b/src/org/mxchange/jphone/phonenumbers/landline/LandLineNumber.java @@ -114,6 +114,16 @@ public class LandLineNumber implements DialableLandLineNumber, Comparable