From 622ee2e032eff0c7e047145540400f0182bbfe50 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 16 Aug 2016 16:26:52 +0200 Subject: [PATCH] Continued a bit: - renamed named queries: SearchFaxId -> SearchFaxNumberId and SearchLandLineId -> SearchLandLineNumberId - renamed entity phone_numbers -> landline_numbers - renamed also all suffixes phone_ -> landline_ --- .../jphone/phonenumbers/fax/FaxNumber.java | 2 +- .../phonenumbers/landline/LandLineNumber.java | 20 +++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/org/mxchange/jphone/phonenumbers/fax/FaxNumber.java b/src/org/mxchange/jphone/phonenumbers/fax/FaxNumber.java index 92dd5d9..9d7bcda 100644 --- a/src/org/mxchange/jphone/phonenumbers/fax/FaxNumber.java +++ b/src/org/mxchange/jphone/phonenumbers/fax/FaxNumber.java @@ -46,7 +46,7 @@ import org.mxchange.jcountry.data.CountryData; @NamedQueries ( { @NamedQuery (name = "AllFaxNumbers", query = "SELECT f FROM fax_numbers AS f ORDER BY f.phoneId ASC"), - @NamedQuery (name = "SearchFaxId", query = "SELECT f FROM fax_numbers AS f WHERE f.phoneId = :faxId") + @NamedQuery (name = "SearchFaxNumberId", query = "SELECT f FROM fax_numbers AS f WHERE f.phoneId = :faxNumberId") } ) @SuppressWarnings ("PersistenceUnitPresent") diff --git a/src/org/mxchange/jphone/phonenumbers/landline/LandLineNumber.java b/src/org/mxchange/jphone/phonenumbers/landline/LandLineNumber.java index c567c4c..df18350 100644 --- a/src/org/mxchange/jphone/phonenumbers/landline/LandLineNumber.java +++ b/src/org/mxchange/jphone/phonenumbers/landline/LandLineNumber.java @@ -41,12 +41,12 @@ import org.mxchange.jcountry.data.CountryData; *

* @author Roland Haeder */ -@Entity (name = "phone_numbers") -@Table (name = "phone_numbers") +@Entity (name = "landline_numbers") +@Table (name = "landline_numbers") @NamedQueries ( { - @NamedQuery (name = "AllLandLineNumbers", query = "SELECT p FROM phone_numbers AS p ORDER BY p.phoneId ASC"), - @NamedQuery (name = "SearchLandLineId", query = "SELECT p FROM phone_numbers AS p WHERE p.phoneId = :phoneId") + @NamedQuery (name = "AllLandLineNumbers", query = "SELECT p FROM landline_numbers AS p ORDER BY p.phoneId ASC"), + @NamedQuery (name = "SearchLandLineNumberId", query = "SELECT p FROM landline_numbers AS p WHERE p.phoneId = :landLineNumberId") } ) @SuppressWarnings ("PersistenceUnitPresent") @@ -62,13 +62,13 @@ public class LandLineNumber implements DialableLandLineNumber { * Area code (example: 2151 for Krefeld) */ @Basic (optional = false) - @Column (name = "phone_area_code", length = 10, nullable = false) + @Column (name = "landline_area_code", length = 10, nullable = false) private Integer phoneAreaCode; /** * Connection to table "country_data" */ - @JoinColumn (name = "phone_country_id", nullable = false, updatable = false) + @JoinColumn (name = "landline_country_id", nullable = false, updatable = false) @OneToOne (targetEntity = CountryData.class, cascade = CascadeType.REFRESH, optional = false) private Country phoneCountry; @@ -77,14 +77,14 @@ public class LandLineNumber implements DialableLandLineNumber { */ @Basic (optional = false) @Temporal (TemporalType.TIMESTAMP) - @Column (name = "phone_entry_created", nullable = false, updatable = false) + @Column (name = "landline_entry_created", nullable = false, updatable = false) private Calendar phoneEntryCreated; /** * Timestamp when this entry has been created */ @Temporal (TemporalType.TIMESTAMP) - @Column (name = "phone_entry_updated", updatable = false) + @Column (name = "landline_entry_updated", updatable = false) private Calendar phoneEntryUpdated; /** @@ -92,14 +92,14 @@ public class LandLineNumber implements DialableLandLineNumber { */ @Id @GeneratedValue (strategy = GenerationType.IDENTITY) - @Column (name = "phone_id", length = 10, nullable = false, updatable = false) + @Column (name = "landline_id", length = 10, nullable = false, updatable = false) private Long phoneId; /** * Phone number with out dial prefix */ @Basic (optional = false) - @Column (name = "phone_number", nullable = false) + @Column (name = "landline_number", nullable = false) private Long phoneNumber; /** -- 2.39.5