From 81cd697be71394396c21739acf86c3a0897256af Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 21 Apr 2016 10:45:09 +0200 Subject: [PATCH] Removed all clear() methods in request-scoped beans as it makes no sense to clear them. --- .../PizzaAdminContactWebRequestBean.java | 27 ------------------- .../PizzaAdminCountryWebRequestBean.java | 16 ----------- ...izzaAdminMobileProviderWebRequestBean.java | 14 ---------- .../PizzaAdminContactPhoneWebRequestBean.java | 11 -------- .../user/PizzaAdminUserWebRequestBean.java | 13 --------- 5 files changed, 81 deletions(-) diff --git a/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestBean.java index 49b75499..2cf0c9b6 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestBean.java @@ -494,31 +494,4 @@ public class PizzaAdminContactWebRequestBean implements PizzaAdminContactWebRequ 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/pizzaapplication/beans/country/PizzaAdminCountryWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/country/PizzaAdminCountryWebRequestBean.java index 1fef7df6..6dcd7209 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/country/PizzaAdminCountryWebRequestBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/country/PizzaAdminCountryWebRequestBean.java @@ -146,9 +146,6 @@ public class PizzaAdminCountryWebRequestBean implements PizzaAdminCountryWebRequ // Fire event this.addedCountryEvent.fire(new AdminEventCountryAdded(updatedCountry)); - - // Clear bean - this.clear(); } @Override @@ -222,19 +219,6 @@ public class PizzaAdminCountryWebRequestBean implements PizzaAdminCountryWebRequ 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/pizzaapplication/beans/mobileprovider/PizzaAdminMobileProviderWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/mobileprovider/PizzaAdminMobileProviderWebRequestBean.java index 7bbefcea..465e5de6 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/mobileprovider/PizzaAdminMobileProviderWebRequestBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/mobileprovider/PizzaAdminMobileProviderWebRequestBean.java @@ -129,9 +129,6 @@ public class PizzaAdminMobileProviderWebRequestBean implements PizzaAdminMobileP // Fire event this.providerAddedEvent.fire(new AdminMobileProviderAddedEvent(updatedProvider)); - - // Clear this bean - this.clear(); } @Override @@ -184,17 +181,6 @@ public class PizzaAdminMobileProviderWebRequestBean implements PizzaAdminMobileP 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/pizzaapplication/beans/phone/PizzaAdminContactPhoneWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/phone/PizzaAdminContactPhoneWebRequestBean.java index f289ca94..4cde05e9 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/phone/PizzaAdminContactPhoneWebRequestBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/phone/PizzaAdminContactPhoneWebRequestBean.java @@ -157,15 +157,4 @@ public class PizzaAdminContactPhoneWebRequestBean implements PizzaAdminContactPh 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/pizzaapplication/beans/user/PizzaAdminUserWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestBean.java index 0bed8e1f..ee963dc1 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestBean.java @@ -183,9 +183,6 @@ public class PizzaAdminUserWebRequestBean implements PizzaAdminUserWebRequestCon // 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 PizzaAdminUserWebRequestBean implements PizzaAdminUserWebRequestCon 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. *

-- 2.39.5