From: Roland Häder Date: Thu, 21 Apr 2016 08:45:09 +0000 (+0200) Subject: Removed all clear() methods in request-scoped beans as it makes no sense to clear... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3911252862ccc3e9555f4eec8a82b74aea241abe;p=jfinancials-war.git Removed all clear() methods in request-scoped beans as it makes no sense to clear them. --- diff --git a/src/java/org/mxchange/addressbook/beans/contact/AddressbookAdminContactWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/contact/AddressbookAdminContactWebRequestBean.java index 46f154b5..93c7f7e9 100644 --- a/src/java/org/mxchange/addressbook/beans/contact/AddressbookAdminContactWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/contact/AddressbookAdminContactWebRequestBean.java @@ -476,31 +476,4 @@ public class AddressbookAdminContactWebRequestBean implements AddressbookAdminCo public void init () { } - /** - * Clears this bean - */ - private void clear () { - // Clear all - this.setContactId(null); - this.setBirthday(null); - this.setCellphoneCarrier(null); - this.setCellphoneNumber(null); - this.setCity(null); - this.setComment(null); - this.setCountry(null); - this.setEmailAddress(null); - this.setFamilyName(null); - this.setFaxAreaCode(null); - this.setFaxCountry(null); - this.setFaxNumber(null); - this.setFirstName(null); - this.setGender(null); - this.setHouseNumber(null); - this.setPhoneAreaCode(null); - this.setPhoneCountry(null); - this.setPhoneNumber(null); - this.setStreet(null); - this.setZipCode(null); - } - } diff --git a/src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebRequestBean.java index baac32d4..a3e5cad2 100644 --- a/src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebRequestBean.java @@ -146,9 +146,6 @@ public class AddressbookAdminCountryWebRequestBean implements AddressbookAdminCo // Fire event this.addedCountryEvent.fire(new AdminEventCountryAdded(updatedCountry)); - - // Clear bean - this.clear(); } @Override @@ -222,19 +219,6 @@ public class AddressbookAdminCountryWebRequestBean implements AddressbookAdminCo return (!this.allCountries().isEmpty()); } - /** - * Clears this bean - */ - private void clear () { - // Clear all - this.setCountryAbroadDialPrefix(null); - this.setCountryCode(null); - this.setCountryExternalDialPrefix(null); - this.setCountryI18nKey(null); - this.setCountryIsLocalPrefixRequired(null); - this.setCountryPhoneCode(null); - } - /** * Checks if given country is already added by iterating over the whole list * and try to find it. diff --git a/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookAdminMobileProviderWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookAdminMobileProviderWebRequestBean.java index 954828dd..78bd2d50 100644 --- a/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookAdminMobileProviderWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookAdminMobileProviderWebRequestBean.java @@ -129,9 +129,6 @@ public class AddressbookAdminMobileProviderWebRequestBean implements Addressbook // Fire event this.providerAddedEvent.fire(new AdminMobileProviderAddedEvent(updatedProvider)); - - // Clear this bean - this.clear(); } @Override @@ -184,17 +181,6 @@ public class AddressbookAdminMobileProviderWebRequestBean implements Addressbook return (!this.allMobileProvider().isEmpty()); } - /** - * Clears this bean - */ - private void clear () { - // Clear all fields - this.setProviderCountry(null); - this.setProviderDialPrefix(null); - this.setProviderMailPattern(null); - this.setProviderName(null); - } - /** * Checks whether if the given mobile provider is already created by * checking both dial prefix and country. diff --git a/src/java/org/mxchange/addressbook/beans/phone/AddressbookAdminContactPhoneWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/phone/AddressbookAdminContactPhoneWebRequestBean.java index 7ba2f6c3..57c40db5 100644 --- a/src/java/org/mxchange/addressbook/beans/phone/AddressbookAdminContactPhoneWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/phone/AddressbookAdminContactPhoneWebRequestBean.java @@ -157,15 +157,4 @@ public class AddressbookAdminContactPhoneWebRequestBean implements AddressbookAd this.landLine = landLine; } - /** - * Clears this bean - */ - private void clear () { - // Clear all instances - this.setCellPhone(null); - this.setFax(null); - this.setLandLine(null); - this.setContact(null); - } - } diff --git a/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java index 1805a99b..07612f5b 100644 --- a/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java @@ -183,9 +183,6 @@ public class AddressbookAdminUserWebRequestBean implements AddressbookAdminUserW // Add user to local list this.userList.add(updatedUser); - // Clear all - this.clear(); - // Clear contact instance this.contactController.clear(); } @@ -282,16 +279,6 @@ public class AddressbookAdminUserWebRequestBean implements AddressbookAdminUserW return user; } - /** - * Clears this bean - */ - private void clear () { - // Clear all - this.setUserName(null); - this.setUserPassword(null); - this.setUserPasswordRepeat(null); - } - /** * Checks if same password is entered and that they are not empty. *