2 * ============LICENSE_START==========================================
4 * ===================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ===================================================================
8 * Unless otherwise specified, all software contained herein is licensed
9 * under the Apache License, Version 2.0 (the "License");
10 * you may not use this software except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
21 * Unless otherwise specified, all documentation contained herein is licensed
22 * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
23 * you may not use this documentation except in compliance with the License.
24 * You may obtain a copy of the License at
26 * https://creativecommons.org/licenses/by/4.0/
28 * Unless required by applicable law or agreed to in writing, documentation
29 * distributed under the License is distributed on an "AS IS" BASIS,
30 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31 * See the License for the specific language governing permissions and
32 * limitations under the License.
34 * ============LICENSE_END============================================
36 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
38 package org.onap.portalapp.command;
40 import java.util.List;
42 import org.onap.portalapp.portal.domain.EPUser;
43 import org.onap.portalsdk.core.command.support.SearchBase;
45 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
48 public class PostSearchBean extends SearchBase {
50 private EPUser user = null;
51 private EPUser userOrig = null;
52 private String[] selected;
53 private String[] postHrid;
54 private String[] postOrgUserId;
55 private String[] postFirstName;
56 private String[] postLastName;
57 private String[] postOrgCode;
58 private String[] postPhone;
59 private String[] postEmail;
60 private String[] postAddress1;
61 private String[] postAddress2;
62 private String[] postCity;
63 private String[] postState;
64 private String[] postZipCode;
65 private String[] postLocationClli;
66 private String[] postBusinessCountryCode;
67 private String[] postBusinessCountryName;
68 private String[] postDepartment;
69 private String[] postDepartmentName;
70 private String[] postBusinessUnit;
71 private String[] postBusinessUnitName;
72 private String[] postJobTitle;
73 private String[] postOrgManagerUserId;
74 private String[] postCommandChain;
75 private String[] postCompanyCode;
76 private String[] postCompany;
77 private String[] postCostCenter;
78 private String[] postSiloStatus;
79 private String[] postFinancialLocCode;
82 public PostSearchBean() {
86 public PostSearchBean(List<?> items) {
90 userOrig = new EPUser();
98 public String getFirstName() { return user.getFirstName(); }
99 public String getLastName() { return user.getLastName(); }
100 public String getHrid() { return user.getHrid(); }
101 public String getOrgUserId() { return user.getOrgUserId(); }
102 public String getOrgCode() { return user.getOrgCode(); }
103 public String getEmail() { return user.getEmail(); }
104 public String getOrgManagerUserId() { return user.getOrgManagerUserId(); }
106 public String getFirstNameOrig() { return user.getFirstName(); }
107 public String getLastNameOrig() { return user.getLastName(); }
108 public String getHridOrig() { return user.getHrid(); }
109 public String getOrgUserIdOrig() { return user.getOrgUserId(); }
110 public String getOrgCodeOrig() { return user.getOrgCode(); }
111 public String getEmailOrig() { return user.getEmail(); }
112 public String getOrgManagerUserIdOrig() { return user.getOrgManagerUserId(); }
115 public EPUser getUser() { return user; }
117 public String[] getPostEmail() {
121 public String[] getPostFirstName() {
122 return postFirstName;
125 public String[] getPostHrid() {
129 public String[] getPostLastName() {
133 public String[] getPostOrgCode() {
137 public String[] getPostPhone() {
141 public String[] getPostOrgUserId() {
142 return postOrgUserId;
145 public String[] getSelected() {
149 public String[] getPostAddress1() {
153 public String[] getPostBusinessCountryCode() {
154 return postBusinessCountryCode;
157 public String[] getPostCity() {
161 public String[] getPostCommandChain() {
162 return postCommandChain;
165 public String[] getPostCompany() {
169 public String[] getPostCompanyCode() {
170 return postCompanyCode;
173 public String[] getPostDepartment() {
174 return postDepartment;
177 public String[] getPostDepartmentName() {
178 return postDepartmentName;
181 public String[] getPostBusinessCountryName() {
182 return postBusinessCountryName;
185 public String[] getPostJobTitle() {
189 public String[] getPostLocationClli() {
190 return postLocationClli;
193 public String[] getPostManagerUserId() {
194 return postOrgManagerUserId;
197 public String[] getPostState() {
201 public String[] getPostZipCode() {
205 public void setFirstName(String value) { user.setFirstName(value); }
206 public void setLastName(String value) { user.setLastName(value); }
207 public void setHrid(String value) { user.setHrid(value); }
208 public void setOrgUserId(String value) { user.setOrgUserId(value); }
209 public void setOrgCode(String value) { user.setOrgCode(value); }
210 public void setEmail(String value) { user.setEmail(value); }
211 public void setOrgManagerUserId(String value) { user.setOrgManagerUserId(value); }
213 public void setFirstNameOrig(String value) { userOrig.setFirstName(value); }
214 public void setLastNameOrig(String value) { userOrig.setLastName(value); }
215 public void setHridOrig(String value) { userOrig.setHrid(value); }
216 public void setOrgUserIdOrig(String value) { userOrig.setOrgUserId(value); }
217 public void setOrgCodeOrig(String value) { userOrig.setOrgCode(value); }
218 public void setEmailOrig(String value) { userOrig.setEmail(value); }
219 public void setOrgManagerUserIdOrig(String value) { userOrig.setOrgManagerUserId(value); }
221 public void setUser(EPUser value) { this.user = value; }
223 public void setPostEmail(String[] postEmail) {
224 this.postEmail = postEmail;
227 public void setPostFirstName(String[] postFirstName) {
228 this.postFirstName = postFirstName;
231 public void setPostHrid(String[] postHrid) {
232 this.postHrid = postHrid;
235 public void setPostLastName(String[] postLastName) {
236 this.postLastName = postLastName;
239 public void setPostOrgCode(String[] postOrgCode) {
240 this.postOrgCode = postOrgCode;
243 public void setPostPhone(String[] postPhone) {
244 this.postPhone = postPhone;
247 public void setPostUserId(String[] postOrgUserId) {
248 this.postOrgUserId = postOrgUserId;
251 public void setSelected(String[] selected) {
252 this.selected = selected;
255 public void setPostAddress1(String[] postAddress1) {
256 this.postAddress1 = postAddress1;
259 public void setPostBusinessCountryCode(String[] postBusinessCountryCode) {
260 this.postBusinessCountryCode = postBusinessCountryCode;
263 public void setPostCity(String[] postCity) {
264 this.postCity = postCity;
267 public void setPostCommandChain(String[] postCommandChain) {
268 this.postCommandChain = postCommandChain;
271 public void setPostCompany(String[] postCompany) {
272 this.postCompany = postCompany;
275 public void setPostCompanyCode(String[] postCompanyCode) {
276 this.postCompanyCode = postCompanyCode;
279 public void setPostDepartment(String[] postDepartment) {
280 this.postDepartment = postDepartment;
283 public void setPostDepartmentName(String[] postDepartmentName) {
284 this.postDepartmentName = postDepartmentName;
287 public void setPostBusinessCountryName(String[] postBusinessCountryName) {
288 this.postBusinessCountryName = postBusinessCountryName;
291 public void setPostJobTitle(String[] postJobTitle) {
292 this.postJobTitle = postJobTitle;
295 public void setPostLocationClli(String[] postLocationClli) {
296 this.postLocationClli = postLocationClli;
299 public void setPostManagerUserId(String[] postOrgManagerUserId) {
300 this.postOrgManagerUserId = postOrgManagerUserId;
303 public void setPostState(String[] postState) {
304 this.postState = postState;
307 public void setPostZipCode(String[] postZipCode) {
308 this.postZipCode = postZipCode;
311 public String[] getPostAddress2() {
315 public void setPostAddress2(String[] postAddress2) {
316 this.postAddress2 = postAddress2;
319 public EPUser getUserOrig() {
323 public void setUserOrig(EPUser userOrig) {
324 this.userOrig = userOrig;
327 public String[] getPostBusinessUnit() {
328 return postBusinessUnit;
331 public void setPostBusinessUnit(String[] postBusinessUnit) {
332 this.postBusinessUnit = postBusinessUnit;
335 public String[] getPostBusinessUnitName() {
336 return postBusinessUnitName;
339 public void setPostBusinessUnitName(String[] postBusinessUnitName) {
340 this.postBusinessUnitName = postBusinessUnitName;
343 public String[] getPostCostCenter() {
344 return postCostCenter;
347 public void setPostCostCenter(String[] postCostCenter) {
348 this.postCostCenter = postCostCenter;
351 public String[] getPostSiloStatus() {
352 return postSiloStatus;
355 public void setPostSiloStatus(String[] postSiloStatus) {
356 this.postSiloStatus = postSiloStatus;
359 public String[] getPostFinancialLocCode() {
360 return postFinancialLocCode;
363 public void setPostFinancialLocCode(String[] postFinancialLocCode) {
364 this.postFinancialLocCode = postFinancialLocCode;
368 public void resetSearch() {
370 setUser(new EPUser());
374 public boolean isCriteriaUpdated() {
375 if(user==null&&userOrig==null)
377 else if(user==null||userOrig==null)
381 Utilities.nvl(user.getFirstName()).equals(Utilities.nvl(userOrig.getFirstName()))&&
382 Utilities.nvl(user.getLastName()).equals(Utilities.nvl(userOrig.getLastName()))&&
383 //Utilities.nvl(user.getHrid()).equals(Utilities.nvl(userOrig.getHrid()))&&
384 Utilities.nvl(user.getOrgUserId()).equals(Utilities.nvl(userOrig.getOrgUserId()))&&
385 Utilities.nvl(user.getOrgCode()).equals(Utilities.nvl(userOrig.getOrgCode()))&&
386 Utilities.nvl(user.getEmail()).equals(Utilities.nvl(userOrig.getEmail()))&&
387 Utilities.nvl(user.getOrgManagerUserId()).equals(Utilities.nvl(userOrig.getOrgManagerUserId()))&&
389 } // isCriteriaUpdated