- simplified for() loop, no need for extra iteration + next instance as a simple
double-dot (:) does the same on a List<Foo>
Signed-off-by: Roland Häder <roland@mxchange.org>
// Is cache there?
if (!this.basicDataCache.iterator().hasNext()) {
// Get whole list
- final List<BusinessBasicData> list = this.businessDataBean.allCompanyBasicData();
+ final List<BusinessBasicData> basicDatas = this.businessDataBean.allCompanyBasicData();
// Add all
- for (final Iterator<BusinessBasicData> iterator = list.iterator(); iterator.hasNext();) {
- // Get next element
- final BusinessBasicData next = iterator.next();
-
+ for (final BusinessBasicData basicData : basicDatas) {
// Add it to cache
- this.basicDataCache.put(next.getBasicDataId(), next);
+ this.basicDataCache.put(basicData.getBasicDataId(), basicData);
}
}
// Is cache there?
if (!this.branchOfficeCache.iterator().hasNext()) {
// Get whole list
- final List<BranchOffice> list = this.branchOfficeBean.allBranchOffices();
+ final List<BranchOffice> branchOffices = this.branchOfficeBean.allBranchOffices();
// Add all
- for (final Iterator<BranchOffice> iterator = list.iterator(); iterator.hasNext();) {
- // Get next element
- final BranchOffice next = iterator.next();
-
+ for (final BranchOffice branchOffice : branchOffices) {
// Add it to cache
- this.branchOfficeCache.put(next.getBranchId(), next);
+ this.branchOfficeCache.put(branchOffice.getBranchId(), branchOffice);
}
}
// Is cache there?
if (!this.departmentCache.iterator().hasNext()) {
// Get whole list
- final List<Department> list = this.departmentBean.allDepartments();
+ final List<Department> departments = this.departmentBean.allDepartments();
// Add all
- for (final Iterator<Department> iterator = list.iterator(); iterator.hasNext();) {
- // Get next element
- final Department next = iterator.next();
-
+ for (final Department department : departments) {
// Add it to cache
- this.departmentCache.put(next.getDepartmentId(), next);
+ this.departmentCache.put(department.getDepartmentId(), department);
}
}
// Is cache there?
if (!this.employeeCache.iterator().hasNext()) {
// Get whole list
- final List<Employee> list = this.employeeBean.allCompanyEmployees();
+ final List<Employee> employees = this.employeeBean.allCompanyEmployees();
// Add all
- for (final Iterator<Employee> iterator = list.iterator(); iterator.hasNext();) {
- // Get next element
- final Employee next = iterator.next();
-
+ for (final Employee employee : employees) {
// Add it to cache
- this.employeeCache.put(next.getEmployeeId(), next);
+ this.employeeCache.put(employee.getEmployeeId(), employee);
}
}
// Is cache there?
if (!this.openingTimesCache.iterator().hasNext()) {
// Get whole list
- final List<OpeningTime> list = this.openingTimesBean.allOpeningTimes();
+ final List<OpeningTime> openingTimes = this.openingTimesBean.allOpeningTimes();
// Add all
- for (final Iterator<OpeningTime> iterator = list.iterator(); iterator.hasNext();) {
- // Get next element
- final OpeningTime next = iterator.next();
-
+ for (final OpeningTime openingTime : openingTimes) {
// Add it to cache
- this.openingTimesCache.put(next.getOpeningId(), next);
+ this.openingTimesCache.put(openingTime.getOpeningId(), openingTime);
}
}
// Is cache there?
if (!this.countryCache.iterator().hasNext()) {
// Get whole list
- final List<Country> list = this.countryBean.allCountries();
+ final List<Country> countries = this.countryBean.allCountries();
// Add all
- for (final Iterator<Country> iterator = list.iterator(); iterator.hasNext();) {
- // Get next element
- final Country next = iterator.next();
-
+ for (final Country country : countries) {
// Add it to cache
- this.countryCache.put(next.getCountryId(), next);
+ this.countryCache.put(country.getCountryId(), country);
}
}
}
// Is cache there?
if (!this.mobileProviderCache.iterator().hasNext()) {
// Get whole list
- final List<MobileProvider> list = this.mobileProviderBean.allMobileProviders();
+ final List<MobileProvider> mobileProviders = this.mobileProviderBean.allMobileProviders();
// Add all
- for (final Iterator<MobileProvider> iterator = list.iterator(); iterator.hasNext();) {
- // Get next element
- final MobileProvider next = iterator.next();
-
+ for (final MobileProvider mobileProvider : mobileProviders) {
// Add it to cache
- this.mobileProviderCache.put(next.getProviderId(), next);
+ this.mobileProviderCache.put(mobileProvider.getProviderId(), mobileProvider);
}
}
// Is cache there?
if (!this.faxNumberCache.iterator().hasNext()) {
// Get whole list
- final List<DialableFaxNumber> list = this.phoneBean.allFaxNumbers();
+ final List<DialableFaxNumber> faxNumbers = this.phoneBean.allFaxNumbers();
// Add all
- for (final Iterator<DialableFaxNumber> iterator = list.iterator(); iterator.hasNext();) {
- // Get next element
- final DialableFaxNumber next = iterator.next();
-
+ for (final DialableFaxNumber faxNumber : faxNumbers) {
// Add it to cache
- this.faxNumberCache.put(next.getPhoneId(), next);
+ this.faxNumberCache.put(faxNumber.getPhoneId(), faxNumber);
}
}
// Is cache there?
if (!this.landLineNumberCache.iterator().hasNext()) {
// Get whole list
- final List<DialableLandLineNumber> list = this.phoneBean.allLandLineNumbers();
+ final List<DialableLandLineNumber> lineNumbers = this.phoneBean.allLandLineNumbers();
// Add all
- for (final Iterator<DialableLandLineNumber> iterator = list.iterator(); iterator.hasNext();) {
- // Get next element
- final DialableLandLineNumber next = iterator.next();
-
+ for (final DialableLandLineNumber lineNumber : lineNumbers) {
// Add it to cache
- this.landLineNumberCache.put(next.getPhoneId(), next);
+ this.landLineNumberCache.put(lineNumber.getPhoneId(), lineNumber);
}
}
// Is cache there?
if (!this.mobileNumberCache.iterator().hasNext()) {
// Get whole list
- final List<DialableMobileNumber> list = this.phoneBean.allMobileNumbers();
+ final List<DialableMobileNumber> mobileNumbers = this.phoneBean.allMobileNumbers();
// Add all
- for (final Iterator<DialableMobileNumber> iterator = list.iterator(); iterator.hasNext();) {
- // Get next element
- final DialableMobileNumber next = iterator.next();
-
+ for (final DialableMobileNumber mobileNumber : mobileNumbers) {
// Add it to cache
- this.mobileNumberCache.put(next.getPhoneId(), next);
+ this.mobileNumberCache.put(mobileNumber.getPhoneId(), mobileNumber);
}
}
}
// Is cache there?
if (!this.userCache.iterator().hasNext()) {
// Get whole list
- final List<User> list = this.userBean.allUsers();
+ final List<User> users = this.userBean.allUsers();
// Add all
- for (final Iterator<User> iterator = list.iterator(); iterator.hasNext();) {
- // Get next element
- final User next = iterator.next();
-
+ for (final User user : users) {
// Add it to cache
- this.userCache.put(next.getUserId(), next);
- this.userNameCache.put(next.getUserId(), next.getUserName());
+ this.userCache.put(user.getUserId(), user);
+ this.userNameCache.put(user.getUserId(), user.getUserName());
}
}
@PostConstruct
public void init () {
// Get whole list
- final List<LogableUserActivity> list = this.userActivityBean.fetchAllUserActivityLog();
+ final List<LogableUserActivity> userActivities = this.userActivityBean.fetchAllUserActivityLog();
// Put all in map, per-user
- for (final LogableUserActivity userActivity : list) {
+ for (final LogableUserActivity userActivity : userActivities) {
// Is the list there?
if (!this.userActivityCache.containsKey(userActivity.getActivityUser())) {
// Init list
</attribute>
<attribute>
<name>renderShowLink</name>
- <description>Whether this tag is used to show mobile data (default true).</description>
+ <description>Whether this tag is used to show fax data (default true).</description>
<required>false</required>
<type>java.lang.Boolean</type>
</attribute>
</attribute>
<attribute>
<name>renderShowLink</name>
- <description>Whether this tag is used to show mobile data (default true).</description>
+ <description>Whether this tag is used to show land-line data (default true).</description>
<required>false</required>
<type>java.lang.Boolean</type>
</attribute>
</attribute>
<attribute>
<name>renderShowLink</name>
- <description>Whether this tag is used to show mobile data (default true).</description>
+ <description>Whether this tag is used to show mobile provider data (default true).</description>
<required>false</required>
<type>java.lang.Boolean</type>
</attribute>
<source>resources/tags/admin/panel_grids/fax/admin_fax_data.tpl</source>
<attribute>
<name>renderShowLink</name>
- <description>Whether this tag is used to show mobile data (default true).</description>
+ <description>Whether this tag is used to show fax data (default true).</description>
<required>false</required>
<type>java.lang.Boolean</type>
</attribute>
<source>resources/tags/admin/panel_grids/landline/admin_landline_data.tpl</source>
<attribute>
<name>renderShowLink</name>
- <description>Whether this tag is used to show mobile data (default true).</description>
+ <description>Whether this tag is used to show land-line data (default true).</description>
<required>false</required>
<type>java.lang.Boolean</type>
</attribute>