+ final Contact localContact = new UserContact(
+ this.getPersonalTitle(),
+ this.getFirstName(),
+ this.getFamilyName()
+ );
+
+ // Add all others
+ localContact.setContactBirthday(this.getBirthday());
+ localContact.setContactCity(this.getCity());
+ localContact.setContactComment(this.getComment());
+ localContact.setContactCountry(this.getContactCountry());
+ localContact.setContactEmailAddress(this.getEmailAddress());
+ localContact.setContactHouseNumber(this.getHouseNumber());
+ localContact.setContactId(this.getContactId());
+ localContact.setContactStreet(this.getStreet());
+ localContact.setContactTitle(this.getAcademicTitle());
+ localContact.setContactZipCode(this.getZipCode());
+
+ // Set ownContact
+ localContact.setContactOwnContact(Boolean.TRUE);
+
+ // Don't set null or wrong references
+ if ((landLine instanceof DialableLandLineNumber) && (landLine.getPhoneCountry() instanceof Country) && (this.getLandLineAreaCode() != null) && (this.getLandLineNumber() != null) && (this.getLandLineAreaCode() > 0) && (this.getLandLineNumber() > 0)) {
+ // Now the number must be given
+ if (landLine.getPhoneAreaCode() == null) {
+ // Is null
+ throw new NullPointerException("phone.phoneAreaCode is null"); //NOI18N
+ } else if (landLine.getPhoneAreaCode() < 1) {
+ // Abort here
+ throw new IllegalArgumentException("phone.phoneAreaCode is zero or below."); //NOI18N
+ } else if (landLine.getPhoneNumber() == null) {
+ // Is null
+ throw new NullPointerException("phone.phoneNumber is null"); //NOI18N
+ } else if (landLine.getPhoneNumber() < 1) {
+ // Abort here
+ throw new IllegalArgumentException("phone.phoneNumber is zero or below."); //NOI18N
+ }