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.jjobs.beans.business.basicdata;
20 import javax.enterprise.context.RequestScoped;
21 import javax.inject.Inject;
22 import javax.inject.Named;
23 import org.mxchange.jcontactsbusiness.model.basicdata.AdminBasicCompanyDataSessionBeanRemote;
24 import org.mxchange.jcountry.model.data.Country;
25 import org.mxchange.jjobs.beans.BaseJobsBean;
26 import org.mxchange.jjobs.beans.user.login.JobsUserLoginWebSessionController;
29 * A business contact bean (controller)
31 * @author Roland Häder<roland@mxchange.org>
33 @Named ("basicDataController")
35 public class JobsBasicDataWebRequestBean extends BaseJobsBean implements JobsBasicDataWebRequestController {
40 private static final long serialVersionUID = 56_189_028_928_371L;
43 * EJB for administrative basic business data purposes
45 @EJB (lookup = "java:global/jjobs-ejb/adminBasicCompanyData!org.mxchange.jcontactsbusiness.model.basicdata.AdminBasicCompanyDataSessionBeanRemote", description = "A stateless session bean for administrative purposes.")
46 private AdminBasicCompanyDataSessionBeanRemote adminBasicCompanyDataBean;
49 * Comments for this company
51 private String companyComments;
54 * Companies (main) email address (example: info@company.example)
56 private String companyEmailAddress;
61 private String companyName;
64 * Area code for fax number
66 private Integer faxAreaCode;
69 * Country for fax number
71 private Country faxCountry;
74 * Dial number for fax number
76 private Long faxNumber;
79 * Area code for land-line number
81 private Integer landLineAreaCode;
84 * Country for land-line number
86 private Country landLineCountry;
89 * Dial number for land-line number
91 private Long landLineNumber;
97 private JobsUserLoginWebSessionController userLoginController;
102 public JobsBasicDataWebRequestBean () {
103 // Call super constructor
108 * Getter for comments
112 public String getCompanyComments () {
113 return this.companyComments;
117 * Setter for comments
119 * @param companyComments Comments
121 public void setCompanyComments (final String companyComments) {
122 this.companyComments = companyComments;
126 * Getter for company's (main) email address
128 * @return Company's (main) email address
130 public String getCompanyEmailAddress () {
131 return this.companyEmailAddress;
135 * Setter for company's (main) email address
137 * @param companyEmailAddress Company's (main) email address
139 public void setCompanyEmailAddress (final String companyEmailAddress) {
140 this.companyEmailAddress = companyEmailAddress;
144 * Getter for company cacheName
146 * @return Company cacheName
148 public String getCompanyName () {
149 return this.companyName;
153 * Setter for company cacheName
155 * @param companyName Company cacheName
157 public void setCompanyName (final String companyName) {
158 this.companyName = companyName;
162 * Getter for fax number's area code
164 * @return Fax number's area code
166 public Integer getFaxAreaCode () {
167 return this.faxAreaCode;
171 * Setter for fax number's area code
173 * @param faxAreaCode Fax number's area code
175 public void setFaxAreaCode (final Integer faxAreaCode) {
176 this.faxAreaCode = faxAreaCode;
180 * Getter for fax's country instance
182 * @return Fax' country instance
184 public Country getFaxCountry () {
185 return this.faxCountry;
189 * Setter for fax's country instance
191 * @param faxCountry Fax' country instance
193 public void setFaxCountry (final Country faxCountry) {
194 this.faxCountry = faxCountry;
198 * Getter for fax number
202 public Long getFaxNumber () {
203 return this.faxNumber;
207 * Setter for fax number
209 * @param faxNumber Fax number
211 public void setFaxNumber (final Long faxNumber) {
212 this.faxNumber = faxNumber;
216 * Getter for land-line number's area code
218 * @return Land-line number's area code
220 public Integer getLandLineAreaCode () {
221 return this.landLineAreaCode;
225 * Setter for land-line number's area code
227 * @param landLineAreaCode Land-line number's area code
229 public void setLandLineAreaCode (final Integer landLineAreaCode) {
230 this.landLineAreaCode = landLineAreaCode;
234 * Getter for land-line number's country instance
236 * @return Land-line number's country instance
238 public Country getLandLineCountry () {
239 return this.landLineCountry;
243 * Setter for land-line number's country instance
245 * @param landLineCountry Land-line number's country instance
247 public void setLandLineCountry (final Country landLineCountry) {
248 this.landLineCountry = landLineCountry;
252 * Getter for land-line number
254 * @return Land-line number
256 public Long getLandLineNumber () {
257 return this.landLineNumber;
261 * Setter for land-line number
263 * @param landLineNumber Land-line number
265 public void setLandLineNumber (final Long landLineNumber) {
266 this.landLineNumber = landLineNumber;
272 private void clear () {
274 this.setCompanyComments(null);
275 this.setCompanyEmailAddress(null);
276 this.setCompanyName(null);
277 this.setFaxAreaCode(null);
278 this.setFaxCountry(null);
279 this.setFaxNumber(null);
280 this.setLandLineAreaCode(null);
281 this.setLandLineCountry(null);
282 this.setLandLineNumber(null);