*/
private static final long serialVersionUID = 18_563_748_781_956L;
+ /**
+ * Area code (example: 2151 for Krefeld)
+ */
+ @Basic (optional = false)
+ @Column (name = "phone_area_code", length = 10, nullable = false)
+ private Integer phoneAreaCode;
+
+ /**
+ * Connection to table "country_data"
+ */
+ @JoinColumn (name = "phone_country_id", nullable = false, updatable = false)
+ @OneToOne (targetEntity = CountryData.class, cascade = CascadeType.MERGE, optional = false, fetch = FetchType.EAGER)
+ private Country phoneCountry;
+
/**
* Timestamp when this entry has been created
*/
@Column (name = "phone_number", length = 20, nullable = false)
private Long phoneNumber;
- /**
- * Area code (example: 2151 for Krefeld)
- */
- @Basic (optional = false)
- @Column (name = "phone_area_code", length = 10, nullable = false)
- private Integer phoneAreaCode;
-
- /**
- * Connection to table "country_data"
- */
- @JoinColumn (name = "phone_country_id", nullable = false, updatable = false)
- @OneToOne (targetEntity = CountryData.class, cascade = CascadeType.MERGE, optional = false, fetch = FetchType.EAGER)
- private Country phoneCountry;
-
/**
* Counstructor with country instance, area code and number
* <p>
}
@Override
- public Long getPhoneId () {
- return this.phoneId;
+ public int compareTo (final DialableLandLineNumber dialableNumber) {
+ throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
@Override
- public void setPhoneId (final Long phoneId) {
- this.phoneId = phoneId;
- }
+ public boolean equals (Object object) {
+ if (object == null) {
+ return false;
+ } else if (this.getClass() != object.getClass()) {
+ return false;
+ }
- @Override
- public Long getPhoneNumber () {
- return this.phoneNumber;
+ final DialableLandLineNumber other = (DialableLandLineNumber) object;
+
+ if (!Objects.equals(this.getPhoneNumber(), other.getPhoneNumber())) {
+ return false;
+ } else if (!Objects.equals(this.getPhoneAreaCode(), other.getPhoneAreaCode())) {
+ return false;
+ } else if (!Objects.equals(this.getPhoneCountry(), other.getPhoneCountry())) {
+ return false;
+ }
+
+ return true;
}
@Override
- public void setPhoneNumber (final Long phoneNumber) {
- this.phoneNumber = phoneNumber;
+ public int hashCode () {
+ int hash = 7;
+ hash = 47 * hash + Objects.hashCode(this.getPhoneNumber());
+ hash = 47 * hash + Objects.hashCode(this.getPhoneAreaCode());
+ hash = 47 * hash + Objects.hashCode(this.getPhoneCountry());
+ return hash;
}
@Override
}
@Override
- public int compareTo (final DialableLandLineNumber dialableNumber) {
- throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ public Long getPhoneId () {
+ return this.phoneId;
}
@Override
- public boolean equals (Object object) {
- if (object == null) {
- return false;
- } else if (getClass() != object.getClass()) {
- return false;
- }
-
- final DialableLandLineNumber other = (DialableLandLineNumber) object;
-
- if (!Objects.equals(this.getPhoneNumber(), other.getPhoneNumber())) {
- return false;
- } else if (!Objects.equals(this.getPhoneAreaCode(), other.getPhoneAreaCode())) {
- return false;
- } else if (!Objects.equals(this.getPhoneCountry(), other.getPhoneCountry())) {
- return false;
- }
-
- return true;
+ public void setPhoneId (final Long phoneId) {
+ this.phoneId = phoneId;
}
-
@Override
- public int hashCode () {
- int hash = 7;
- hash = 47 * hash + Objects.hashCode(this.getPhoneNumber());
- hash = 47 * hash + Objects.hashCode(this.getPhoneAreaCode());
- hash = 47 * hash + Objects.hashCode(this.getPhoneCountry());
- return hash;
+ public Long getPhoneNumber () {
+ return this.phoneNumber;
+ }
+ @Override
+ public void setPhoneNumber (final Long phoneNumber) {
+ this.phoneNumber = phoneNumber;
}
+
}