public PaymentInfoForm() { address.setPhonePrimary(new PhoneImpl()); address.setPhoneSecondary(new PhoneImpl()); address.setPhoneFax(new PhoneImpl()); }
@Override public Phone getPhonePrimary() { Phone legacyPhone = new PhoneImpl(); legacyPhone.setPhoneNumber(this.primaryPhone); return (phonePrimary == null && this.primaryPhone !=null)? legacyPhone : phonePrimary; }
public void setAddress(Address address) { if (address.getPhonePrimary() == null) { address.setPhonePrimary(new PhoneImpl()); } if (address.getPhoneSecondary() == null) { address.setPhoneSecondary(new PhoneImpl()); } if (address.getPhoneFax() == null) { address.setPhoneFax(new PhoneImpl()); } this.address = address; }
public CustomerPayment findDefaultPaymentForCustomer(Customer customer) { if (customer == null) { return null; } List<CustomerPayment> payments = readCustomerPaymentsByCustomerId(customer.getId()); for (CustomerPayment payment : payments) { if (payment.isDefault()) { return payment; } } return null; }
Customer findCustomerByid(int id){ for (Customer customer : customers) { if (customer.getId() == id) { return customer; } } return null; }
@Override public String toString() { return (addressName == null) ? address.getFirstName() + " - " + address.getAddressLine1() : addressName; }
@Override public void createRegisteredCustomerRoles(Customer customer) { Role role = roleDao.readRoleByName("ROLE_USER"); CustomerRole customerRole = new CustomerRoleImpl(); customerRole.setRole(role); customerRole.setCustomer(customer); roleDao.addRoleToCustomer(customerRole); }
@Override public String getMainEntityName() { return getName(); } }
@Override public String getMainEntityName() { return getName(); } }
@Override public String getMainEntityName() { return getName(); } }
@Override public Phone getPhoneFax() { Phone legacyPhone = new PhoneImpl(); legacyPhone.setPhoneNumber(this.fax); return (phoneFax == null && this.fax != null)? legacyPhone : phoneFax; }
public CustomerAddressForm() { address.setPhonePrimary(new PhoneImpl()); address.setPhoneSecondary(new PhoneImpl()); address.setPhoneFax(new PhoneImpl()); }
@Override public Phone getPhoneSecondary() { Phone legacyPhone = new PhoneImpl(); legacyPhone.setPhoneNumber(this.secondaryPhone); return (phoneSecondary == null && this.secondaryPhone !=null)? legacyPhone : phoneSecondary; }
public BillingInfoForm() { address.setPhonePrimary(new PhoneImpl()); address.setPhoneSecondary(new PhoneImpl()); address.setPhoneFax(new PhoneImpl()); }
@Override public void setAsText(String text) { Phone phone = new PhoneImpl(); phone.setPhoneNumber(text); setValue(phone); }
public ShippingInfoForm() { address.setPhonePrimary(new PhoneImpl()); address.setPhoneSecondary(new PhoneImpl()); address.setPhoneFax(new PhoneImpl()); }
@Override public void setAsText(String text) { Phone phone = new PhoneImpl(); phone.setPhoneNumber(text); setValue(phone); }
@Override public void setAsText(String text) { Phone phone = new PhoneImpl(); phone.setPhoneNumber(text); setValue(phone); }
@DataProvider(name = "setupPhone") public static Object[][] createPhone() { Phone phone = new PhoneImpl(); phone.setPhoneNumber("999-999-9999"); return new Object[][] { new Object[] { phone } }; } }