2 * Copyright (C) 2016 - 2020 Free Software Foundation
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Affero General Public License as
6 * published by the Free Software Foundation, either version 3 of the
7 * License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Affero General Public License for more details.
14 * You should have received a copy of the GNU Affero General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 package org.mxchange.jfinancials.beans.contact.phone;
19 import java.text.MessageFormat;
20 import java.util.Date;
22 import javax.enterprise.context.RequestScoped;
23 import javax.enterprise.event.Event;
24 import javax.enterprise.event.Observes;
25 import javax.enterprise.inject.Any;
26 import javax.faces.application.FacesMessage;
27 import javax.inject.Inject;
28 import javax.inject.Named;
29 import org.mxchange.jcontacts.events.contact.add.ObservableAdminAddedContactEvent;
30 import org.mxchange.jcontacts.events.contact.created.ObservableCreatedContactEvent;
31 import org.mxchange.jcontacts.events.contact.update.ObservableAdminUpdatedContactEvent;
32 import org.mxchange.jcontacts.events.fax.linked.AdminLinkedFaxNumberEvent;
33 import org.mxchange.jcontacts.events.fax.linked.ObservableAdminLinkedFaxNumberEvent;
34 import org.mxchange.jcontacts.events.fax.unlinked.AdminUnlinkedFaxNumberEvent;
35 import org.mxchange.jcontacts.events.fax.unlinked.ObservableAdminUnlinkedFaxNumberEvent;
36 import org.mxchange.jcontacts.events.landline.linked.AdminLinkedLandLineNumberEvent;
37 import org.mxchange.jcontacts.events.landline.linked.ObservableAdminLinkedLandLineNumberEvent;
38 import org.mxchange.jcontacts.events.landline.unlinked.AdminUnlinkedLandLineNumberEvent;
39 import org.mxchange.jcontacts.events.landline.unlinked.ObservableAdminUnlinkedLandLineNumberEvent;
40 import org.mxchange.jcontacts.model.contact.Contact;
41 import org.mxchange.jcontacts.model.phone.AdminContactsPhoneSessionBeanRemote;
42 import org.mxchange.jcountry.model.data.Country;
43 import org.mxchange.jfinancials.beans.BaseFinancialsBean;
44 import org.mxchange.jfinancials.beans.phone.FinancialsAdminPhoneWebRequestController;
45 import org.mxchange.jphone.events.fax.created.ObservableCreatedFaxNumberEvent;
46 import org.mxchange.jphone.events.landline.created.ObservableCreatedLandLineNumberEvent;
47 import org.mxchange.jphone.exceptions.phone.PhoneNumberAlreadyLinkedException;
48 import org.mxchange.jphone.exceptions.phone.PhoneNumberNotLinkedException;
49 import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber;
50 import org.mxchange.jphone.model.phonenumbers.fax.FaxNumber;
51 import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
52 import org.mxchange.jphone.model.phonenumbers.landline.LandLineNumber;
53 import org.mxchange.jusercore.events.user.add.ObservableAdminAddedUserEvent;
56 * An administrative contact phone controller (bean)
58 * @author Roland Häder<roland@mxchange.org>
60 @Named ("adminContactPhoneController")
62 public class FinancialsAdminContactPhoneWebRequestBean extends BaseFinancialsBean implements FinancialsAdminContactPhoneWebRequestController {
65 * Call-stack instance (5 may show BeanELResolver.getValue as caller)
67 private static final short THREAD_STACK = 5;
72 private static final long serialVersionUID = 542_145_347_916L;
75 * Administrative EJB for phone number
77 @EJB (lookup = "java:global/jfinancials-ejb/adminContactPhone!org.mxchange.jcontacts.model.phone.AdminContactsPhoneSessionBeanRemote")
78 private AdminContactsPhoneSessionBeanRemote adminContactPhoneBean;
81 * Event being fired when a fax number has been linked
85 private Event<ObservableAdminLinkedFaxNumberEvent> adminLinkedFaxNumberEvent;
88 * Event being fired when a land-line number has been linked
92 private Event<ObservableAdminLinkedLandLineNumberEvent> adminLinkedLandLineNumberEvent;
95 * Administrative phone controller
98 private FinancialsAdminPhoneWebRequestController adminPhoneController;
103 private Contact contact;
106 * Area code (city dial prefix) for fax number
108 private Integer faxAreaCode;
111 * Country (for dial prefix) for fax number
113 private Country faxCountry;
118 private Long faxNumber;
121 * Event being fired when a fax number has been unlinked
125 private Event<ObservableAdminUnlinkedFaxNumberEvent> faxNumberUnlinkedEvent;
128 * Area code (city dial prefix) for land-line number
130 private Integer landLineAreaCode;
133 * Country (for dial prefix) for land-line number
135 private Country landLineCountry;
140 private Long landLineNumber;
143 * Event being fired when a land-line number has been unlinked
147 private Event<ObservableAdminUnlinkedLandLineNumberEvent> landLineNumberUnlinkedEvent;
150 * When phone number has been created
152 private Date phoneEntryCreated;
155 * When phone number has been updated
157 private Date phoneEntryUpdated;
160 * Phone id (primary key)
162 private Long phoneId;
165 * Default constructor
167 public FinancialsAdminContactPhoneWebRequestBean () {
168 // Call super constructor
171 // String caller = MessageFormat.format("{0}.{1}", Thread.currentThread().getStackTrace()[3].getClassName(), Thread.currentThread().getStackTrace()[3].getMethodName());
172 // System.out.println(MessageFormat.format("{0}: Constructed, caller: {1}", this.getClass().getSimpleName(), caller));
176 * Observes events being fired when an administrator has added a new
179 * @param event Event being fired
181 public void afterAdminAddedContactEvent (@Observes final ObservableAdminAddedContactEvent event) {
182 // The event must be valid
185 throw new NullPointerException("event is null"); //NOI18N
186 } else if (event.getAddedContact() == null) {
188 throw new NullPointerException("event.addedContact is null"); //NOI18N
189 } else if (event.getAddedContact().getContactId() == null) {
191 throw new NullPointerException("event.addedContact.contactId is null"); //NOI18N
192 } else if (event.getAddedContact().getContactId() < 1) {
194 throw new IllegalArgumentException(MessageFormat.format("event.addedContact.contactId={0} is not valid", event.getAddedContact().getContactId())); //NOI18N
202 * Event observer for newly added users by administrator
204 * @param event Event being fired
206 public void afterAdminAddedUserEvent (@Observes final ObservableAdminAddedUserEvent event) {
207 // Event and contained entity instance should not be null
210 throw new NullPointerException("event is null"); //NOI18N
211 } else if (event.getAddedUser() == null) {
213 throw new NullPointerException("event.addedUser is null"); //NOI18N
214 } else if (event.getAddedUser().getUserId() == null) {
216 throw new NullPointerException("event.addedUser.userId is null"); //NOI18N
217 } else if (event.getAddedUser().getUserId() < 1) {
219 throw new IllegalArgumentException(MessageFormat.format("userId of user={0} is not valid: {1}", event.getAddedUser(), event.getAddedUser().getUserId())); //NOI18N
227 * Event observer for updated contact data by administrators
229 * @param event Updated contact data event
231 public void afterAdminUpdatedContactDataEvent (@Observes final ObservableAdminUpdatedContactEvent event) {
232 // Event and contained entity instance should not be null
235 throw new NullPointerException("event is null"); //NOI18N
236 } else if (event.getUpdatedContact() == null) {
238 throw new NullPointerException("event.updatedContact is null"); //NOI18N
239 } else if (event.getUpdatedContact().getContactId() == null) {
241 throw new NullPointerException("event.updatedContact.contactId is null"); //NOI18N
242 } else if (event.getUpdatedContact().getContactId() < 1) {
244 throw new IllegalArgumentException(MessageFormat.format("contactId of contact={0} is not valid: {1}", event.getUpdatedContact(), event.getUpdatedContact().getContactId())); //NOI18N
252 * Observer for events being fired when a bean helper has successfully
253 * created a contact instance.
255 * @param event Event being fired
257 public void afterCreatedContactEvent (@Observes final ObservableCreatedContactEvent event) {
259 //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("AdminContactController::afterCreatedContactEvent(): contact={0} - CALLED!", contact)); //NOI18N
261 // The event instance must be valid
264 throw new NullPointerException("event is null"); //NOI18N
265 } else if (event.getCreatedContact() == null) {
267 throw new NullPointerException("event.createdContact is null"); //NOI18N //NOI18N
268 } else if (event.getCreatedContact().getContactId() == null) {
270 throw new NullPointerException("event.createdContact.contactId is null"); //NOI18N //NOI18N
271 } else if (event.getCreatedContact().getContactId() < 1) {
273 throw new IllegalStateException(MessageFormat.format("event.createdContact.contactId={0} is not valid.", event.getCreatedContact().getContactId())); //NOI18N
277 this.setContact(event.getCreatedContact());
281 * Observes events being fired when a bean helper has successfully created a
282 * fax number instance.
284 * @param event Event being fired
286 public void afterCreatedFaxNumberEvent (@Observes final ObservableCreatedFaxNumberEvent event) {
287 // The event instance must be valid
290 throw new NullPointerException("event is null"); //NOI18N
291 } else if (event.getFaxNumber() == null) {
293 throw new NullPointerException("event.faxNumber is null"); //NOI18N
294 } else if (event.getFaxNumber().getPhoneId() == null) {
295 // Throw NPE yet again
296 throw new NullPointerException("event.faxNumber.phoneId is null"); //NOI18N
297 } else if (event.getFaxNumber().getPhoneId() < 1) {
298 // Throw NPE yet again
299 throw new NullPointerException(MessageFormat.format("event.faxNumber.phoneId={0} is invalid", event.getFaxNumber().getPhoneId())); //NOI18N
302 // Get fax number from event
303 final DialableFaxNumber number = event.getFaxNumber();
305 // Copy all data to this bean
306 this.setPhoneId(number.getPhoneId());
307 this.setFaxCountry(number.getPhoneCountry());
308 this.setFaxAreaCode(number.getPhoneAreaCode());
309 this.setFaxNumber(number.getPhoneNumber());
310 this.setPhoneEntryCreated(number.getPhoneEntryCreated());
311 this.setPhoneEntryUpdated(number.getPhoneEntryUpdated());
315 * Observes events being fired when a bean helper has successfully created a
316 * land-line number instance.
318 * @param event Event being fired
320 public void afterCreatedLandLineNumberEvent (@Observes final ObservableCreatedLandLineNumberEvent event) {
321 // The event instance must be valid
324 throw new NullPointerException("event is null"); //NOI18N
325 } else if (event.getLandLineNumber() == null) {
327 throw new NullPointerException("event.landLineNumber is null"); //NOI18N
328 } else if (event.getLandLineNumber().getPhoneId() == null) {
329 // Throw NPE yet again
330 throw new NullPointerException("event.landLineNumber.phoneId is null"); //NOI18N
331 } else if (event.getLandLineNumber().getPhoneId() < 1) {
332 // Throw NPE yet again
333 throw new NullPointerException(MessageFormat.format("event.landLineNumber.phoneId={0} is invalid", event.getLandLineNumber().getPhoneId())); //NOI18N
336 // Get fax number from event
337 final DialableLandLineNumber number = event.getLandLineNumber();
339 // Copy all data to this bean
340 this.setPhoneId(number.getPhoneId());
341 this.setLandLineCountry(number.getPhoneCountry());
342 this.setLandLineAreaCode(number.getPhoneAreaCode());
343 this.setLandLineNumber(number.getPhoneNumber());
344 this.setPhoneEntryCreated(number.getPhoneEntryCreated());
345 this.setPhoneEntryUpdated(number.getPhoneEntryUpdated());
349 * Links fax number to contact from bean helper as "main fax number".
351 * @return Redirect outcome
353 public String doLinkMainFaxNumber () {
354 // Get contact from helper
355 final Contact targetContact = this.getContact();
357 // Is all data properly set?
358 if (null == targetContact) {
360 throw new NullPointerException("targetContact is null"); //NOI18N
361 } else if (targetContact.getContactId() == null) {
363 throw new NullPointerException("targetContact.contactId is null"); //NOI18N
364 } else if (targetContact.getContactId() < 1) {
366 throw new IllegalArgumentException(MessageFormat.format("targetContact.contactId={0} is not valid", targetContact.getContactId())); //NOI18N
367 } else if (this.getFaxCountry() == null) {
369 throw new NullPointerException("this.faxCountry is null"); //NOI18N
370 } else if (this.getFaxCountry().getCountryId() == null) {
372 throw new NullPointerException("this.faxCountry.countryId is null"); //NOI18N
373 } else if (this.getFaxCountry().getCountryId() < 1) {
375 throw new IllegalArgumentException(MessageFormat.format("this.faxCountry.countryId={0} is not valid.", this.getFaxCountry().getCountryId())); //NOI18N
376 } else if (this.getFaxAreaCode() == null) {
378 throw new NullPointerException("this.faxAreaCode is null"); //NOI18N
379 } else if (this.getFaxAreaCode() < 1) {
381 throw new IllegalArgumentException(MessageFormat.format("this.faxAreaCode={0} is invalid", this.getFaxAreaCode())); //NOI18N
382 } else if (this.getFaxNumber() == null) {
384 throw new NullPointerException("this.faxNumber is null"); //NOI18N
385 } else if (this.getFaxNumber() < 1) {
387 throw new IllegalArgumentException(MessageFormat.format("this.faxNumber={0} is invalid", this.getFaxNumber())); //NOI18N
391 final Contact updatedContact;
392 final DialableFaxNumber number = new FaxNumber(this.getFaxCountry(), this.getFaxAreaCode(), this.getFaxNumber());
397 updatedContact = this.adminContactPhoneBean.linkNewFaxNumberWithContact(targetContact, number);
398 } catch (final PhoneNumberAlreadyLinkedException ex) {
399 // Throw again as cause
400 this.showFacesMessage("form_add_contact_fax:faxNumber", ex, FacesMessage.SEVERITY_ERROR); //NOI18N
405 this.adminLinkedFaxNumberEvent.fire(new AdminLinkedFaxNumberEvent(updatedContact, number));
407 // Return to contact profile
408 return "admin_show_contact"; //NOI18N
412 * Links land-line number to contact from bean helper as "main land-line
415 * @return Redirect outcome
417 public String doLinkMainLandLineNumber () {
418 // Get contact from helper
419 final Contact targetContact = this.getContact();
421 // Is all data properly set?
422 if (null == targetContact) {
424 throw new NullPointerException("targetContact is null"); //NOI18N
425 } else if (targetContact.getContactId() == null) {
427 throw new NullPointerException("targetContact.contactId is null"); //NOI18N
428 } else if (targetContact.getContactId() < 1) {
430 throw new IllegalArgumentException(MessageFormat.format("targetContact.contactId={0} is not valid", targetContact.getContactId())); //NOI18N
431 } else if (this.getLandLineCountry() == null) {
433 throw new NullPointerException("this.landLineCountry is null"); //NOI18N
434 } else if (this.getLandLineCountry().getCountryId() == null) {
436 throw new NullPointerException("this.landLineCountry.countryId is null"); //NOI18N
437 } else if (this.getLandLineCountry().getCountryId() < 1) {
439 throw new IllegalArgumentException(MessageFormat.format("this.landLineCountry.countryId={0} is not valid.", this.getLandLineCountry().getCountryId())); //NOI18N
440 } else if (this.getLandLineAreaCode() == null) {
442 throw new NullPointerException("this.landLineAreaCode is null"); //NOI18N
443 } else if (this.getLandLineAreaCode() < 1) {
445 throw new IllegalArgumentException(MessageFormat.format("this.landLineAreaCode={0} is invalid", this.getLandLineAreaCode())); //NOI18N
446 } else if (this.getLandLineNumber() == null) {
448 throw new NullPointerException("this.landLineNumber is null"); //NOI18N
449 } else if (this.getLandLineNumber() < 1) {
451 throw new IllegalArgumentException(MessageFormat.format("this.landLineNumber={0} is invalid", this.getLandLineNumber())); //NOI18N
455 final Contact updatedContact;
456 final DialableLandLineNumber number = new LandLineNumber(this.getLandLineCountry(), this.getLandLineAreaCode(), this.getLandLineNumber());
461 updatedContact = this.adminContactPhoneBean.linkNewLandLineNumberWithContact(targetContact, number);
462 } catch (final PhoneNumberAlreadyLinkedException ex) {
463 // Throw again as cause
464 this.showFacesMessage("form_add_contact_landLine:landLineNumber", ex, FacesMessage.SEVERITY_ERROR); //NOI18N
469 this.adminLinkedLandLineNumberEvent.fire(new AdminLinkedLandLineNumberEvent(updatedContact, number));
471 // Return to contact profile
472 return "admin_show_contact"; //NOI18N
476 * Getter for contact instance
478 * @return Contact instance
480 public Contact getContact () {
485 * Setter for contact instance
487 * @param contact Contact instance
489 public void setContact (final Contact contact) {
490 this.contact = contact;
494 * Getter for fax area code
496 * @return Fax area code
498 public Integer getFaxAreaCode () {
499 return this.faxAreaCode;
503 * Setter for fax area code
505 * @param faxAreaCode Fax area code
507 public void setFaxAreaCode (final Integer faxAreaCode) {
508 this.faxAreaCode = faxAreaCode;
512 * Getter for fax numbers country
514 * @return Fax numbers country
516 public Country getFaxCountry () {
517 return this.faxCountry;
521 * Setter for fax numbers country
523 * @param faxCountry Fax numbers country
525 public void setFaxCountry (final Country faxCountry) {
526 this.faxCountry = faxCountry;
530 * Getter for fax number
534 public Long getFaxNumber () {
535 return this.faxNumber;
539 * Setter for fax number
541 * @param faxNumber Fax number
543 public void setFaxNumber (final Long faxNumber) {
544 this.faxNumber = faxNumber;
548 * Getter for land-line area code
550 * @return Land-line area code
552 public Integer getLandLineAreaCode () {
553 return this.landLineAreaCode;
557 * Setter for land-line area code
559 * @param landLineAreaCode Land-line area code
561 public void setLandLineAreaCode (final Integer landLineAreaCode) {
562 this.landLineAreaCode = landLineAreaCode;
566 * Getter for land-line country
568 * @return Land-line country
570 public Country getLandLineCountry () {
571 return this.landLineCountry;
575 * Setter for land-line country
577 * @param landLineCountry Land-line country
579 public void setLandLineCountry (final Country landLineCountry) {
580 this.landLineCountry = landLineCountry;
584 * Getter for land-line number
586 * @return Land-line number
588 public Long getLandLineNumber () {
589 return this.landLineNumber;
593 * Setter for land-line number
595 * @param landLineNumber Land-line number
597 public void setLandLineNumber (final Long landLineNumber) {
598 this.landLineNumber = landLineNumber;
602 * Setter for phone id
606 public Long getPhoneId () {
611 * Getter for phone id
613 * @param phoneId Phone id
615 public void setPhoneId (final Long phoneId) {
616 this.phoneId = phoneId;
620 * Unlinks fax data with current contact
622 * @return Redirect outcome
624 public String unlinkFaxContactData () {
625 // Create fax number instance
626 final DialableFaxNumber number = this.createFaxNumber();
629 if (number == null) {
630 // Not set, throw NPE
631 throw new NullPointerException("number is null"); //NOI18N
632 } else if (number.getPhoneId() == null) {
634 throw new NullPointerException("number.phoneId is null"); //NOI18N
635 } else if (number.getPhoneId() < 1) {
637 throw new IllegalArgumentException(MessageFormat.format("number.phoneId={0} is not valid", number.getPhoneId())); //NOI18N
638 } else if (number.getPhoneNumber() == null) {
640 throw new NullPointerException("number.phoneNumber is null"); //NOI18N
641 } else if (number.getPhoneNumber() < 1) {
642 // Throw it again ...
643 throw new NullPointerException(MessageFormat.format("number.phoneNumber={0} is not valid.", number.getPhoneNumber())); //NOI18N
644 } else if (this.getContact() == null) {
645 // ... and throw again
646 throw new NullPointerException("this.contact is null"); //NOI18N
647 } else if (this.getContact().getContactId() == null) {
649 throw new NullPointerException("this.contact.contactId is null"); //NOI18N
650 } else if (this.getContact().getContactId() < 1) {
652 throw new IllegalArgumentException(MessageFormat.format("this.contact.contactId={0} is invalid.", this.getContact().getContactId())); //NOI18N
655 // Init contact instance
656 final Contact updatedContact;
659 // Unlink it and return contact without fax instance
660 updatedContact = this.adminContactPhoneBean.unlinkFaxDataFromContact(this.getContact(), number);
661 } catch (final PhoneNumberNotLinkedException ex) {
663 this.showFacesMessage("form_unlink_contact_fax:faxNumberId", ex, FacesMessage.SEVERITY_ERROR); //NOI18N
668 this.faxNumberUnlinkedEvent.fire(new AdminUnlinkedFaxNumberEvent(updatedContact, number));
671 return "admin_show_contact"; //NOI18N
675 * Unlinks land-line data with current contact
677 * @return Redirect outcome
679 public String unlinkLandLineContactData () {
680 // Create fax number instance
681 final DialableLandLineNumber number = this.createLandLineNumber();
684 if (number == null) {
685 // Not set, throw NPE
686 throw new NullPointerException("number is null"); //NOI18N
687 } else if (number.getPhoneId() == null) {
689 throw new NullPointerException("number.phoneId is null"); //NOI18N
690 } else if (number.getPhoneId() < 1) {
692 throw new IllegalArgumentException(MessageFormat.format("number.phoneId={0} is not valid", number.getPhoneId())); //NOI18N
693 } else if (number.getPhoneNumber() == null) {
695 throw new NullPointerException("number.phoneNumber is null"); //NOI18N
696 } else if (number.getPhoneNumber() < 1) {
697 // Throw it again ...
698 throw new NullPointerException(MessageFormat.format("number.phoneNumber={0} is not valid.", number.getPhoneNumber())); //NOI18N
699 } else if (this.getContact() == null) {
700 // ... and throw again
701 throw new NullPointerException("this.contact is null"); //NOI18N
702 } else if (this.getContact().getContactId() == null) {
704 throw new NullPointerException("this.contact.contactId is null"); //NOI18N
705 } else if (this.getContact().getContactId() < 1) {
707 throw new IllegalArgumentException(MessageFormat.format("this.contact.contactId={0} is invalid.", this.getContact().getContactId())); //NOI18N
710 // Init contact instance
711 final Contact updatedContact;
714 // Unlink it and return contact without landLine instance
715 updatedContact = this.adminContactPhoneBean.unlinkLandLineDataFromContact(this.getContact(), number);
716 } catch (final PhoneNumberNotLinkedException ex) {
718 this.showFacesMessage("form_unlink_contact_landLine:landLineNumberId", ex, FacesMessage.SEVERITY_ERROR); //NOI18N
723 this.landLineNumberUnlinkedEvent.fire(new AdminUnlinkedLandLineNumberEvent(updatedContact, number));
726 return "admin_show_contact"; //NOI18N
732 private void clear () {
737 * Creates an instance of a DialableFaxNumber class
739 * @return DialableFaxNumber class
741 private DialableFaxNumber createFaxNumber () {
743 final DialableFaxNumber number = new FaxNumber(this.getFaxCountry(), this.getFaxAreaCode(), this.getFaxNumber());
745 // Set all other fields
746 number.setPhoneEntryCreated(this.getPhoneEntryCreated());
747 number.setPhoneEntryUpdated(this.getPhoneEntryUpdated());
748 number.setPhoneId(this.getPhoneId());
755 * Returns an instance of a DialableLandLineNumber from all fields stored in
758 * @return An instance of a DialableLandLineNumber class
760 private DialableLandLineNumber createLandLineNumber () {
762 final DialableLandLineNumber number = new LandLineNumber(this.getLandLineCountry(), this.getLandLineAreaCode(), this.getLandLineNumber());
764 // Add all other data
765 number.setPhoneEntryCreated(this.getPhoneEntryCreated());
766 number.setPhoneEntryUpdated(this.getPhoneEntryUpdated());
767 number.setPhoneId(this.getPhoneId());
774 * Getter for phone entry created
776 * @return Phone entry created
778 @SuppressWarnings ("ReturnOfDateField")
779 private Date getPhoneEntryCreated () {
780 return this.phoneEntryCreated;
784 * Setter for phone entry created
786 * @param phoneEntryCreated Phone entry created
788 @SuppressWarnings ("AssignmentToDateFieldFromParameter")
789 private void setPhoneEntryCreated (final Date phoneEntryCreated) {
790 this.phoneEntryCreated = phoneEntryCreated;
794 * Getter for phone entry updated
796 * @return Phone entry updated
798 @SuppressWarnings ("ReturnOfDateField")
799 private Date getPhoneEntryUpdated () {
800 return this.phoneEntryUpdated;
804 * Setter for phone entry updated
806 * @param phoneEntryUpdated Phone entry updated
808 @SuppressWarnings ("AssignmentToDateFieldFromParameter")
809 private void setPhoneEntryUpdated (final Date phoneEntryUpdated) {
810 this.phoneEntryUpdated = phoneEntryUpdated;