@Entity (name = "cellphone_numbers")
@Table (name = "cellphone_numbers")
@NamedQueries (
- @NamedQuery (name = "SearchCellphoneId", query = "SELECT c FROM cellphone_numbers AS c WHERE c.phoneId = :cellphoneId")
+ {
+ @NamedQuery (name = "AllCellphoneNumbers", query = "SELECT c FROM cellphone_numbers AS c ORDER BY c.phoneId ASC"),
+ @NamedQuery (name = "SearchCellphoneId", query = "SELECT c FROM cellphone_numbers AS c WHERE c.phoneId = :cellphoneId")
+ }
)
@SuppressWarnings ("PersistenceUnitPresent")
public class CellphoneNumber implements DialableCellphoneNumber {
* Constructor with cellphone provider and number
* <p>
* @param cellphoneProvider Cellphone provider instance
- * @param cellphoneNumber Cellphone number
+ * @param cellphoneNumber Cellphone number
*/
public CellphoneNumber (final MobileProvider cellphoneProvider, final Long cellphoneNumber) {
// Call default constructor
return true;
}
- @Override
- public int hashCode () {
- int hash = 5;
- hash = 97 * hash + Objects.hashCode(this.getCellphoneProvider());
- hash = 97 * hash + Objects.hashCode(this.getPhoneNumber());
- return hash;
- }
-
@Override
public MobileProvider getCellphoneProvider () {
return this.cellphoneProvider;
this.phoneNumber = phoneNumber;
}
+ @Override
+ public int hashCode () {
+ int hash = 5;
+
+ hash = 97 * hash + Objects.hashCode(this.getCellphoneProvider());
+ hash = 97 * hash + Objects.hashCode(this.getPhoneNumber());
+
+ return hash;
+ }
+
}
@Entity (name = "fax_numbers")
@Table (name = "fax_numbers")
@NamedQueries (
- @NamedQuery (name = "SearchFaxId", query = "SELECT f FROM fax_numbers AS f WHERE f.phoneId = :faxId")
+ {
+ @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")
+ }
)
@SuppressWarnings ("PersistenceUnitPresent")
public class FaxNumber implements DialableFaxNumber {
/**
* Constructor with country, area code and number
* <p>
- * @param faxCountry Country instance
- * @param faxAreaCode Area code (without leading zeros)
- * @param faxNumber Fax number (without area code and leading zero)
+ * @param faxCountry Country instance
+ * @param faxAreaCode Area code (without leading zeros)
+ * @param faxNumber Fax number (without area code and leading zero)
*/
public FaxNumber (final Country faxCountry, final Integer faxAreaCode, final Long faxNumber) {
// Call default constructor
@Entity (name = "phone_numbers")
@Table (name = "phone_numbers")
@NamedQueries (
- @NamedQuery (name = "SearchLandLineId", query = "SELECT p FROM phone_numbers AS p WHERE p.phoneId = :phoneId")
+ {
+ @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")
+ }
)
@SuppressWarnings ("PersistenceUnitPresent")
public class LandLineNumber implements DialableLandLineNumber {
/**
* Constructor with country instance, area code and number
* <p>
- * @param phoneCountry Country instance
- * @param phoneAreaCode Phone area code
- * @param phoneNumber Phone number
+ * @param phoneCountry Country instance
+ * @param phoneAreaCode Phone area code
+ * @param phoneNumber Phone number
*/
public LandLineNumber (final Country phoneCountry, final Integer phoneAreaCode, final Long phoneNumber) {
// Call default constructor
return true;
}
- @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;
- }
-
@Override
public Integer getPhoneAreaCode () {
return this.phoneAreaCode;
}
@Override
+ @SuppressWarnings ("AssignmentToDateFieldFromParameter")
public void setPhoneEntryCreated (final Calendar phoneEntryCreated) {
this.phoneEntryCreated = phoneEntryCreated;
}
}
@Override
+ @SuppressWarnings ("AssignmentToDateFieldFromParameter")
public void setPhoneEntryUpdated (final Calendar phoneEntryUpdated) {
this.phoneEntryUpdated = phoneEntryUpdated;
}
this.phoneNumber = phoneNumber;
}
+ @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;
+ }
+
}