import java.util.Calendar;
import java.util.Date;
import java.util.Objects;
-import javax.annotation.PostConstruct;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
@Column (name = "contact_zip_code", nullable = false, length = 6)
private Integer contactZipCode;
+ /**
+ * Default constructor
+ */
+ public UserContact () {
+ // Default is not user's own contact
+ this.contactOwnContact = Boolean.FALSE;
+
+ // Unknown gender
+ this.contactGender = Gender.UNKNOWN;
+ }
+
/**
* Constructor for contactGender and names
* <p>
* @param contactFamilyName Family name
*/
public UserContact (final Gender contactGender, final String contactFirstName, final String contactFamilyName) {
- // Call other constructor
+ // Call default constructor
this();
// Set all
this.contactFamilyName = contactFamilyName;
}
- /**
- * Default constructor
- */
- public UserContact () {
- // Default is not user's own contact
- this.contactOwnContact = Boolean.FALSE;
- }
-
@Override
public void copyAll (final Contact contact) {
// Copy all:
this.contactZipCode = contactZipCode;
}
- /**
- * Initialization with fake contactGender UNKNOWN
- */
- @PostConstruct
- public void init () {
- // Fake contactGender
- this.contactGender = Gender.UNKNOWN;
- }
-
@Override
public Boolean isOwnContact () {
return this.contactOwnContact;