From 9b87a7c465cbe4f26f6806b463c747a72408e6d8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 8 Jun 2016 12:11:27 +0200 Subject: [PATCH] let's make sure that serial numbers of objects are never persisted (being ignored by JPA) --- src/org/mxchange/jcontactsbusiness/CompanyContact.java | 1 + .../mxchange/jcontactsbusiness/basicdata/CompanyBasicData.java | 2 ++ .../mxchange/jcontactsbusiness/branch/CompanyBranchOffice.java | 2 ++ .../jcontactsbusiness/department/CompanyDepartment.java | 2 ++ .../mxchange/jcontactsbusiness/employee/CompanyEmployee.java | 2 ++ .../jcontactsbusiness/headquarters/CompanyHeadQuartersData.java | 2 ++ .../jcontactsbusiness/jobposition/EmployeePosition.java | 2 ++ src/org/mxchange/jcontactsbusiness/logo/CompanyLogo.java | 2 ++ .../jcontactsbusiness/opening_times/BusinessOpeningTimes.java | 2 ++ 9 files changed, 17 insertions(+) diff --git a/src/org/mxchange/jcontactsbusiness/CompanyContact.java b/src/org/mxchange/jcontactsbusiness/CompanyContact.java index b542c40..99012d4 100644 --- a/src/org/mxchange/jcontactsbusiness/CompanyContact.java +++ b/src/org/mxchange/jcontactsbusiness/CompanyContact.java @@ -55,6 +55,7 @@ public class CompanyContact implements BusinessContact { /** * Serial number */ + @Transient private static final long serialVersionUID = 470_375_172_748_691L; /** diff --git a/src/org/mxchange/jcontactsbusiness/basicdata/CompanyBasicData.java b/src/org/mxchange/jcontactsbusiness/basicdata/CompanyBasicData.java index 38cced0..4135815 100644 --- a/src/org/mxchange/jcontactsbusiness/basicdata/CompanyBasicData.java +++ b/src/org/mxchange/jcontactsbusiness/basicdata/CompanyBasicData.java @@ -31,6 +31,7 @@ import javax.persistence.OneToOne; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; +import javax.persistence.Transient; import org.mxchange.jcontactsbusiness.logo.BusinessLogo; import org.mxchange.jcontactsbusiness.logo.CompanyLogo; import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; @@ -53,6 +54,7 @@ public class CompanyBasicData implements BusinessBasicData { /** * Serial number */ + @Transient private static final long serialVersionUID = 486_895_878_178_761L; /** diff --git a/src/org/mxchange/jcontactsbusiness/branch/CompanyBranchOffice.java b/src/org/mxchange/jcontactsbusiness/branch/CompanyBranchOffice.java index 13845d8..c352667 100644 --- a/src/org/mxchange/jcontactsbusiness/branch/CompanyBranchOffice.java +++ b/src/org/mxchange/jcontactsbusiness/branch/CompanyBranchOffice.java @@ -30,6 +30,7 @@ import javax.persistence.OneToOne; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; +import javax.persistence.Transient; import org.mxchange.jcontactsbusiness.BusinessContact; import org.mxchange.jcontactsbusiness.CompanyContact; import org.mxchange.jcountry.data.Country; @@ -54,6 +55,7 @@ public class CompanyBranchOffice implements BranchOffice { /** * Serial number */ + @Transient private static final long serialVersionUID = 47_957_817_276_871_852L; /** diff --git a/src/org/mxchange/jcontactsbusiness/department/CompanyDepartment.java b/src/org/mxchange/jcontactsbusiness/department/CompanyDepartment.java index cf335c9..3fb5a8c 100644 --- a/src/org/mxchange/jcontactsbusiness/department/CompanyDepartment.java +++ b/src/org/mxchange/jcontactsbusiness/department/CompanyDepartment.java @@ -31,6 +31,7 @@ import javax.persistence.OneToOne; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; +import javax.persistence.Transient; import org.mxchange.jcontactsbusiness.BusinessContact; import org.mxchange.jcontactsbusiness.CompanyContact; import org.mxchange.jcontactsbusiness.branch.BranchOffice; @@ -55,6 +56,7 @@ public class CompanyDepartment implements Department { /** * Serial number */ + @Transient private static final long serialVersionUID = 94_835_918_958_717_660L; /** diff --git a/src/org/mxchange/jcontactsbusiness/employee/CompanyEmployee.java b/src/org/mxchange/jcontactsbusiness/employee/CompanyEmployee.java index 2a7ed33..6168d3f 100644 --- a/src/org/mxchange/jcontactsbusiness/employee/CompanyEmployee.java +++ b/src/org/mxchange/jcontactsbusiness/employee/CompanyEmployee.java @@ -30,6 +30,7 @@ import javax.persistence.OneToOne; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; +import javax.persistence.Transient; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jcontacts.contact.UserContact; import org.mxchange.jcontactsbusiness.BusinessContact; @@ -60,6 +61,7 @@ public class CompanyEmployee implements Employee { /** * Serial number */ + @Transient private static final long serialVersionUID = 48_959_819_859_812_076L; /** diff --git a/src/org/mxchange/jcontactsbusiness/headquarters/CompanyHeadQuartersData.java b/src/org/mxchange/jcontactsbusiness/headquarters/CompanyHeadQuartersData.java index 5c5753b..70b61f0 100644 --- a/src/org/mxchange/jcontactsbusiness/headquarters/CompanyHeadQuartersData.java +++ b/src/org/mxchange/jcontactsbusiness/headquarters/CompanyHeadQuartersData.java @@ -30,6 +30,7 @@ import javax.persistence.OneToOne; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; +import javax.persistence.Transient; import org.mxchange.jcountry.data.Country; import org.mxchange.jcountry.data.CountryData; import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; @@ -52,6 +53,7 @@ public class CompanyHeadQuartersData implements HeadQuartersData { /** * Serial number */ + @Transient private static final long serialVersionUID = 385_752_948_781_761L; /** diff --git a/src/org/mxchange/jcontactsbusiness/jobposition/EmployeePosition.java b/src/org/mxchange/jcontactsbusiness/jobposition/EmployeePosition.java index 71e6e87..1ef9618 100644 --- a/src/org/mxchange/jcontactsbusiness/jobposition/EmployeePosition.java +++ b/src/org/mxchange/jcontactsbusiness/jobposition/EmployeePosition.java @@ -28,6 +28,7 @@ import javax.persistence.Index; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; +import javax.persistence.Transient; /** * A POJO for job positions @@ -51,6 +52,7 @@ public class EmployeePosition implements JobPosition { /** * Serial number */ + @Transient private static final long serialVersionUID = 18_427_587_187_609L; /** diff --git a/src/org/mxchange/jcontactsbusiness/logo/CompanyLogo.java b/src/org/mxchange/jcontactsbusiness/logo/CompanyLogo.java index 439f9f9..c115109 100644 --- a/src/org/mxchange/jcontactsbusiness/logo/CompanyLogo.java +++ b/src/org/mxchange/jcontactsbusiness/logo/CompanyLogo.java @@ -30,6 +30,7 @@ import javax.persistence.OneToOne; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; +import javax.persistence.Transient; import org.mxchange.jusercore.model.user.LoginUser; import org.mxchange.jusercore.model.user.User; @@ -46,6 +47,7 @@ public class CompanyLogo implements BusinessLogo { /** * Serial number */ + @Transient private static final long serialVersionUID = 475_871_875_718_751_285L; /** diff --git a/src/org/mxchange/jcontactsbusiness/opening_times/BusinessOpeningTimes.java b/src/org/mxchange/jcontactsbusiness/opening_times/BusinessOpeningTimes.java index fe6b882..d297db2 100644 --- a/src/org/mxchange/jcontactsbusiness/opening_times/BusinessOpeningTimes.java +++ b/src/org/mxchange/jcontactsbusiness/opening_times/BusinessOpeningTimes.java @@ -30,6 +30,7 @@ import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; +import javax.persistence.Transient; /** * A POJO for business opening hours @@ -44,6 +45,7 @@ public class BusinessOpeningTimes implements OpeningTimes { /** * Serial number */ + @Transient private static final long serialVersionUID = 19_578_871_756_871L; /** -- 2.39.5