From f1cf69a60d2f59d23d25a0faa9a570758c4fd0cd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 16 Aug 2016 17:09:04 +0200 Subject: [PATCH] Continued a bit: - renamed contact_phone_number_id -> contact_landline_number_id (and phone_id > landline_id) - sorted members --- .../jcontacts/contact/UserContact.java | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/org/mxchange/jcontacts/contact/UserContact.java b/src/org/mxchange/jcontacts/contact/UserContact.java index 4286acc..06109d7 100644 --- a/src/org/mxchange/jcontacts/contact/UserContact.java +++ b/src/org/mxchange/jcontacts/contact/UserContact.java @@ -89,13 +89,6 @@ public class UserContact implements Contact { @Temporal (TemporalType.DATE) private Date contactBirthday; - /** - * Cellphone number - */ - @JoinColumn (name = "contact_mobile_number_id", referencedColumnName = "mobile_id", unique = true) - @OneToOne (targetEntity = MobileNumber.class, cascade = CascadeType.ALL) - private DialableMobileNumber contactMobileNumber; - /** * City */ @@ -181,6 +174,13 @@ public class UserContact implements Contact { @Column (name = "contact_id", nullable = false, updatable = false) private Long contactId; + /** + * Cellphone number + */ + @JoinColumn (name = "contact_mobile_number_id", referencedColumnName = "mobile_id", unique = true) + @OneToOne (targetEntity = MobileNumber.class, cascade = CascadeType.ALL) + private DialableMobileNumber contactMobileNumber; + /** * Flag whether this contact is user's own data */ @@ -191,7 +191,7 @@ public class UserContact implements Contact { /** * Phone number */ - @JoinColumn (name = "contact_phone_number_id", referencedColumnName = "phone_id", unique = true) + @JoinColumn (name = "contact_landline_number_id", referencedColumnName = "landline_id", unique = true) @OneToOne (targetEntity = LandLineNumber.class, cascade = CascadeType.ALL) private DialableLandLineNumber contactPhoneNumber; @@ -336,16 +336,6 @@ public class UserContact implements Contact { this.contactBirthday = contactBirthday; } - @Override - public DialableMobileNumber getContactMobileNumber () { - return this.contactMobileNumber; - } - - @Override - public void setContactMobileNumber (final DialableMobileNumber contactMobileNumber) { - this.contactMobileNumber = contactMobileNumber; - } - @Override public String getContactCity () { return this.contactCity; @@ -479,6 +469,16 @@ public class UserContact implements Contact { this.contactPhoneNumber = contactPhoneNumber; } + @Override + public DialableMobileNumber getContactMobileNumber () { + return this.contactMobileNumber; + } + + @Override + public void setContactMobileNumber (final DialableMobileNumber contactMobileNumber) { + this.contactMobileNumber = contactMobileNumber; + } + @Override public void setContactOwnContact (final Boolean contactOwnContact) { this.contactOwnContact = contactOwnContact; -- 2.39.5