private PersonalInformation getCentricPersonalInformation(Owner app) throws RemoteException { PersonalInformation pi = new PersonalInformation(); pi.setFirstName(app.getFirstName()); pi.setLastName(app.getLastName()); pi.setMiddleName(app.getMiddleName()); pi.setSuffix((String) ListDataLoader.SUFFIX.get(app.getSuffix())); return pi; }
private SubmitPaymentRequest getSubmitPaymentRequest(Owner app) throws RemoteException { SubmitPaymentRequest request = new SubmitPaymentRequest(); CentricPaymentBean bean = app.getCentricPayment(); request.setTraceNumber(bean.getTransactionID()); request.setPersonalInformation(getCentricPersonalInformation(app)); request.setPayments(getPayments(app)); return request; }
@SuppressWarnings("unchecked") private Payment[] getPayments(Owner app) throws RemoteException { List centricPayments = new ArrayList(); List viewPayments = app.getCentricPayment().getPayments(); if (viewPayments != null) { Iterator paymentsIter = viewPayments.iterator(); while (paymentsIter.hasNext()) { CentricPaymentCollectionBean cBean = (CentricPaymentCollectionBean) paymentsIter.next(); centricPayments.add(getCentricPayment(cBean)); } } return (Payment[]) centricPayments.toArray(new Payment[0]); }
public void removePayment(Owner app, int index) { app.getCentricPayment().getPayments().remove(index); }
@SuppressWarnings("unchecked") public void addPayment(Owner app) { app.getCentricPayment().getPayments().add(app.getCentricPayment().getPayment()); app.getCentricPayment().setPayment(new CentricPaymentCollectionBean()); }