Exemplo n.º 1
0
 private Option<Address> findAddressOfOwnerByPhoneNumber(String number, Integer ownerId) {
   if (checkOwner) {
     return addressDAO.findAddressOfOwnerByCategoryAndPhoneNumber(ownerId, category, number);
   } else {
     return addressDAO.findAddressByCategoryAndPhoneNumber(category, number);
   }
 }
Exemplo n.º 2
0
  @Override
  public Option<Address> findAddressByPhoneNumber(String number) {
    if (!checkOwner) {
      return addressDAO.findAddressByCategoryAndPhoneNumber(category, number);
    }

    return new Empty();
  }
Exemplo n.º 3
0
 @Override
 public Option<Address> findAddressOfOwnerByPhoneNumber(PhoneNumber number, Integer ownerId) {
   if (checkOwner) {
     return addressDAO.findAddressOfOwnerByCategoryAndPhoneNumber(ownerId, category, number);
   } else {
     return addressDAO.findAddressByCategoryAndPhoneNumber(category, number);
   }
 }
Exemplo n.º 4
0
 @Override
 public Option<Address> findAddressByPhoneNumber(PhoneNumber phoneNumber) {
   return addressDAO.findAddressByCategoryAndPhoneNumber(category, phoneNumber);
 }